AnsweredAssumed Answered

(plugin development) Adding custom container streams kills the export feature

Question asked by jaketraynham on Jul 25, 2012


(plugin development) Adding custom container streams kills the export feature


FileMaker Pro



Operating system version


Description of the issue

Our MMColor plug-in creates solid, single color "chips"/images to put in container fields that can be stretched or whatever for UI development.  We have a "GetColorImage" function which extracts out of a container the hex color value used to create the color chip.  Up until now, I've simply added a custom "HexC" stream to the container to store this information.  As of FM12, this no longer works correctly.  If I add my custom stream to the container, the Export Field Contents feature no longer works.  The image itself is still displayed in the container (I'm adding both a PNG and a JPEG stream, and it's properly displaying the PNG stream), but the contextual menu's "Export Field Contents" is greyed out and the Export Field Contents script step returns error 10 "requested data is missing".

Steps to reproduce the problem

Our current shipping version of MMColor shows the problem.  You can download the demo and see that Export Field Contents doesn't work.

Expected result

I expected it to work as it used to.  I know a lot of the container code was changed with 12, but it seems something was broken or changed in an undesirable way here.  It seems that the code that figures out what to actually display in the container is still functioning correctly (it displays the PNG image as it used to).  However, the code that tries to figure out what to export seems to have been tampered with/broken in this.  I'm not sure why there is a distinction between what is displayed and what is exported.

Actual result

see description

Exact text of any error message(s) that appear

The Export Field Contents script step returns "requested data is missing"


I also store the hex color value as the filename in the container, so I can work around this, but I don't know why it was broken to begin with.  Perhaps there needs to be a mechanism to indicate what should be exported and/or what should be displayed.  Maybe adding another stream type that is used as a hint for the container code to determine what the appropriate stream type to display/export is.  This hint stream could simply be a list of the other stream types in the container in order of importance.