Identifying the caller

Ken Ray kray at sonsothunder.com
Sun Mar 6 17:09:33 EST 2005


On 3/6/05 3:34 PM, "graham samuel" <graham.samuel at wanadoo.fr> wrote:

> Folks, I really should know this by now, but when a handler is called,
> can its script identify its caller and if so how? I guess there is some
> context description available but I don't know how to find it in the
> docs. And while we're at it, what if the invocation of the handler is
> the result of a "send", e.g.
> 
> send "mouseUp" to myMouseUpHandler
> 
> Can I tell from within the handler that it wasn't a true mouse click
> that invoked it, and if so how?

You can check the executionContexts... the long id of the object that sent
the message is in there, right above the long id of the object that is
processing the message.


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




More information about the use-livecode mailing list