Which stack called the library stack ?

Dar Scott dsc at swcp.com
Fri Sep 24 17:01:35 EDT 2010

On Sep 24, 2010, at 2:11 PM, John Dixon wrote:
> How can I find out which stack called a library stack from the  
> script of the library stack ?

A way that works in some cases is to look at the target and climb  
owners until you get to a stack.

If you are wanting to do callbacks, you might consider having the  
initialize or start or open handler include a long id of the caller  
in the parameter.  The calling stack would then include 'the long id  
of me' in the parameters.

There is an unsupported way.

I think a nice enhancement would be a function that would return the  
long id of the caller.  I think I made one someplace using that  
unsupported way.  I don't know where it is.

Or do you mean which stack did the "start using"?

Dar Scott

More information about the Use-livecode mailing list