Icons and scope

Ken Ray kray at sonsothunder.com
Wed Sep 10 17:56:00 EDT 2003


Actually, Graham, the image needs to have a unique ID vs. a unique name
(AFAIK). So if you say:

  set the icon of btn "myButton" to (the id of img "ImageForIcon" of cd
"MyIcons" of stack "myStuff")

it should work so long as the ID number is unique.

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/ 

> -----Original Message-----
> From: use-revolution-admin at lists.runrev.com 
> [mailto:use-revolution-admin at lists.runrev.com] On Behalf Of 
> Graham Samuel
> Sent: Wednesday, September 10, 2003 5:35 PM
> To: Revolution user discussion
> Subject: Icons and scope
> 
> 
> I'm trying to set the icon of a button to an image in a different 
> substack from the one where the button is. I note from the TD that 
> this is possible, but it appears that such an image must have a 
> unique name. I mean the script has to be like
> 
>   set the icon of btn "myButton" to "imageForIcon"
> 
> The engine then goes and finds "imageForIcon" and uses its unique ID 
> to set the icon of the button.
> 
> It appears you can't write
> 
>   set the icon of btn "myButton" to image "imageForIcon" of cd 
> "MyIcons" of stack "myStuff".
> 
> So the name of the image has to be unique in the whole app. Am I 
> right about this, and if so, are there any other situations where RR 
> breaks the ordinary scope rules, where a name is in principle 
> qualified by group, card and stack names (some of which may in many 
> circumstances remain implied)? I have a feeling the issue may also 
> apply to objects in nested groups, but I'm not sure.
> 
> Graham
> -- 
> -------------------------------------------------------------------
>           Graham Samuel / The Living Fossil Co. / UK & France 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com 
> http://lists.runrev.com/mailman/listinfo/use-> revolution
> 





More information about the use-livecode mailing list