Suggestion: the callingHandler

curry curry at pair.com
Sun Jun 1 01:05:01 EDT 2003


>  > How about a function that returns the name of the handler that called
>  > the current handler? For example, this would be useful when a handler
>  > needs to reset each time a different handler calls it, or to keep
>  > track of different sets of data for each handler that calls it.
>
>You can get this information with the executionContexts function.  I
>hesitate to even mention it, however, because it was designed for
>debugging purposes *only*: using it for conditional execution would
>be, IMHO, heinous.  Use an optional parameter instead unless you want
>your status as an xTalk wizard permanently revoked.
>   Regards,
>     Scott

Wow, now that's more like it!!! :-) Unbelievably neat. Maybe there 
can be a non-debug version?

In the meantime, wooohooo! I did have a real hunch something like 
that might have been added, I just didn't realize it might be 
undocumented.

Seriously, this type of capability is a major key for more powerful 
and smarter handlers. Thanks for the feature and for mentioning it, 
and hope it is elevated to more than only debug status soon!

Thanks,

Curry



More information about the use-livecode mailing list