Object paths?

Ken Ray kray at sonsothunder.com
Tue Jul 20 22:46:15 EDT 2004


> At 5:09 PM -0500 7/20/2004, Ken Ray wrote:
> >  > But further on this... if the defaultStack is closed, what 
> > determines
> >>  what the new defaultStack is?
> >
> >Whatever is the top-most, non-palette stack (and if only 
> palettes are 
> >left, the one that is "in front".
> 
> This is correct in most situations, but it can get a little more 
> complicated than that (the defaultStack defaults to the topStack, 
> which has various rules depending on stack mode which I still need to 
> look up ;-)

Ok, I was trying to avoid discussion of stack modes, but you let the cat out
of the bag, Jeanne! ;-)

The defaultstack is always what is returned by the topStack() function,
unless it is set specifically to some other stack via script.

The official statement on topStack() is that "the topStack is the frontmost
stack with the lowest stack mode". What's a "stack mode" you might say? The
'mode' property of a stack is read-only and is between 0 and 14. The modes
are as follows (you can read the full description in the TD under "mode" to
get more info):

Mode 0: Closed bug not loaded (a stack window that is closed but the stack
is still loaded in memory).
Mode 1: A "normal" editable stack window
Mode 2: A non-editable stack window (opened with its cantModify true)
Mode 3: Modeless dialog
Mode 4: Palette
Mode 5: Modal dialog
Mode 6: Sheet
Mode 7: Pulldown stack menu
Mode 8: Popup stack menu
Mode 9: Option stack menu
Mode 10: Submenu in a stack menu
Mode 11: Combo box stack menu
Mode 12: Collapsed/iconified/minimized
Mode 13: Drawer
Mode 14: (apparently reserved since there's no docs on it)

Most of the modes are irrelevant for "normal" stack usage and addressing
objects on the defaultStack, but you get the idea. This is the official
"pecking order" when it comes to determining what is the topStack.

Now isn't that clear as mud? ;-)

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




More information about the use-livecode mailing list