Behaviors & Image References
scott at tactilemedia.com
Wed Apr 29 11:20:08 EDT 2009
Recently, David Bovill wrote:
> Maybe I don't get the question - my guess is you have something like a
> button in a group that uses an image in its behavior stack for its icon (say
> the image in the behavior stack is called "flag" for example), and you want
> to refer to this image by name - and not have to know / use its ID?
Correct. Apparently Rev is smart enough to find an image in the behavior
stack using an id, but if one references an image by name or using variables
(put "my" & "cool" & "image" into tImageName), the behavior script generates
an error, saying it is unable to to find the image (Rev looks in the stack
where the control is located, as opposed to the behavior stack).
The reason I'm asking is because if I copy the behavior stack and its images
to other mainstacks, any controls that reference the behavior need to know
where to find the images.
I wonder if there's a better way this stuff could work.
Tactile Media, Multimedia & Design
More information about the Use-livecode