synonyms

Jim Lambert jiml at netrin.com
Mon Jun 26 20:23:30 EDT 2017


> BobS wrote:
> 
> For the record, I have given up on my Object Library. The problem is buttons. Button can have icons. That means that I would need to copy all the linked icons along with the button, then manage the relinking of the copied icons that now have their own ID's, then manage dropping the icons BACK onto another card, but only if another icon of the same name does not exist, blah blah blah. YUK! 
> 
> What is needed is for the engine to allow a BUTTON to dynamically be linked to a grapic ON DISK without having to import a graphic object 

Bob,

I may completely misunderstand the issue.  But can’t you have an unseen card with all the icons as image objects referencing image files ON DISK.
Then simply set the icon of each to the ID of the appropriate image.

For example,

create a new image
set its filename to “some>path/hand_icon.jpg”
       set the icon of button “hand” to the ID 1003
where 1003 is the id of the referenced image.

In this way there is no ‘copying’, ‘importing’ or ‘relinking’ needed.

And if you don’t want to deal with remembering IDs just name the new image, say “hand_icon’ then

      set the icon of button “hand” to the ID of image “hand_icon”     (optionally - "of card ‘myIcons’")

Jim Lambert



More information about the use-livecode mailing list