finding the name of the target's stack in a script

Richard Gaskin ambassador at
Tue Jul 24 11:52:45 EDT 2012

Dr. Hawkins wrote:
> I have a handler that needs to handle an event differently depending
> upon which substack the button calling it is on.
> I don't see a direct way of referencing the calling stack.
> There is the topStack() function, which would *seem* to necessarily
> return the relevant stack, but something makes me nervous about that.
> And then there is choosing word 8 of the long name of the object, but
> that seems downright reckless . . .
> Is tehre a "clean" way to do this?

Parsing the executionContexts may help, but if the button must be 
manually clicked it may be simpler to use the mouseStack function.

  Richard Gaskin
  Fourth World
  LiveCode training and consulting:
  Webzine for LiveCode developers:
  Follow me on Twitter:

More information about the Use-livecode mailing list