scope of gRevAppIcon on substacks

Peter M. Brigham pmbrig at gmail.com
Fri Mar 6 22:58:14 EST 2015


You don't have to have the icons in the stack in which it occurs. What I do is call a handler in my library stack setupicons:

on setupicons
   global gRevAppIcon,gRevSmallAppIcon
   put 2241 into gRevAppIcon
   put 2242 into gRevSmallAppIcon
end setupicons

From the dictionary:

-----
LiveCode looks for the specified image in the following order:

1) The stack of the object's behavior (if applicable)
2) The stack of the owner of the object's behavior (if applicable)
 ...
n) The stack of the object's stack's behavior (if applicable)
A) The object's stack
B) The object's stack's mainstack (if a substack)
C) The object's stack's mainstacks substacks
D) The list of open stacks, in order they were loaded
-----

What you DO have to do is call this every time before you invoke an ask or answer dialog. The globals seem to be reset on idle, so they don't stick. It's a PITA that way.

-- Peter

Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig


On Mar 6, 2015, at 5:49 PM, Dr. Hawkins wrote:

> I'm trying (finally) to use gRevAppIcon, which displays an icon in ask &
> answer.
> 
> It seems that this uses the *short* id of the image, which would seem to
> limit it to the stack in which it occurs (or possibly to the main stack).
> 
> I've set it as a global in my mainstack, and it is used in the test answer
> that follows--but then it does not appear in the list of global variables.
> 
> Do I need to have this image lurking in every stack?  that sounds like a
> maintenance nightmare . . .
> 
> Or am I doing something wrong?
> 
> -- 
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list