Suggestion: the callingHandler

Dar Scott dsc at swcp.com
Sat May 31 12:40:01 EDT 2003


On Saturday, May 31, 2003, at 11:02 AM, Richard Gaskin wrote:

>> Useful, too, (and even more so for me), would be a reference to the
>> object whose script contains the handler, something in the class of 
>> the
>> target and me.
>
> Isn't that the distinction between "the target" and "me"?

Not exactly.

The target() function returns the object that originally got the 
message.  I think the keyword "target" is equivalent.  And the "me" 
keyword is equivalent to the object containing the current handler or 
function.  There might be an object in between.

For example, a button might call a handler in the card script.  That 
handler in the card script might call a handler in the stack script.  
In the execution of that last handler, "me" would refer to the stack 
and target() (and target) would refer to the button.

I would like a way for the script in the stack to know that the handler 
that called it is in the script of a particular object.  In this case, 
that would be the card.

Dar Scott




More information about the use-livecode mailing list