2 Replies Latest reply on Nov 1, 2007 10:59 PM by dhogue94

    Editing Rich Symbols

      I made a rich symbol, with three text fields. I made a script, and can edit them in Symbol Properties. Later, I want to add another text field, so I did, and saved the symbol to my common library again, and added a script ... but when I drag an new instance of this symbol to any .png I get an error that says I "could not drag and drop", though the symbol does in fact appear. The new text field appears on the symbol, but the Symbol Properties doesn't have the new script I added for editing it.

      Why? Can I get around this? How do I add a new field to a rich symbol, and then add to the existing script, without causing this error? I can reproduce it every time, and will give detailed instructions to anyone who thinks they can help me.
        • 1. Re: Editing Rich Symbols
          heathrowe Most Valuable Participant
          Can you share your source/script files for others to scrutinize?

          • 2. Re: Editing Rich Symbols
            Did you refresh the Common Library after you made the change to the symbol? Did the error disappear after a re-start of FW? I'm going to guess the answer is yes, the error went away after a re-start.

            If you modify a .JSF file for a symbol during a FW session, the *new* .JSF will not be loaded into FW for that symbol. The new graphic will be placed on the page, but the *old* .JSF somehow resides in memory and is *not* updated. Refreshing/reloading the Common Library does not reload the .JSF files - it only updates the list of files shown in the Common Library panel. You need to re-start FW to get it to see and load the new .JSF file for the updated symbol.

            The "drag and drop" error also occurs when the javascript in the .JSF file associated with a symbol does not match the objects within the graphic (the .PNG file), even though the symbol is dropped on the page and is movable. Usually, the Symbol Properties will not work when this error appears. If you look at the contents of the .JSF file for the symbol, you'll notice some references in the first few lines that basically tell FW how many objects are in the symbol. When you edit a symbol graphic and re-save it, the contents of the associated .JSF file are not updated to match.

            In most cases you can select the updated symbol (the graphic on your page) and then select "Create Symbol Script" from Commands. FW will detect that a script already exists and warn you that any changes or new scripts you create will overwrite the existing script. If you click OK and the .JSF file is not screwed up, you should see the lines for the modifiable objects from your *original* symbol. You can now add a new modifiable field for the new parts in your symbol, and when you save the script it will update to match the new graphic symbol (.PNG) It should now work normally.

            I've created several custom rich symbols by hand coding the .JSF files, and I use the appearance of a "drag and drop" error to let me know when I have an error in the code. I'm not sure why that particular error message is displayed - it seems like we should be given a more descriptive error, like "The script does not match the graphic symbol. The editable components may not be modifiable."

            Hope this helps,