Finding the main stack

Pete pete at mollysrevenge.com
Thu Jul 7 21:12:32 EDT 2011


Got a slightly convoluted situation where I need to get hold of the main
stack for an application.

When the app starts up, I issue a "start using" command to bring in my
library handlers.  I have a libraryStack handler which needs to get hold of
the value of a custom property in the main stack of the handler that issued
the "start using" command.

I tried using "me" and "the target" but they return the main stack of the
library stack, not the calling stack.  Right now, I'm getting around this by
getting hold of the mainstacks property, filtering out the rev stacks and my
library stack and hope that the result leaves one stack - the calling stack.
 However, if there happens to be more than one application's stack in memory
in the IDE, I end up with two or more stack names.

Is there some way to discover the correct main stack in this situation?

Pete
Molly's Revenge <http://www.mollysrevenge.com>



More information about the use-livecode mailing list