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

Mark Wieder mwieder at ahsoftware.net
Tue Jul 24 13:03:42 EDT 2012


Doc-

Tuesday, July 24, 2012, 8:33:52 AM, you wrote:

> I have a handler that needs to handle an event differently depending
> upon which substack the button calling it is on.

Does the long name of the target give you what you need? If you know
the handler will *only* be invoked from substacks, not the mainstack,
then

put the long name of the target into tObject
replace " of " with comma in tObject
set the lineDelimiter to comma
put line -2 of tObject into tSubStackName

Alternately, put your handler in a behavior button script and set the
behavior of the substacks to that button. Then "me" in the script will
refer to the substack.

-- 
-Mark Wieder
 mwieder at ahsoftware.net





More information about the use-livecode mailing list