Whoops: Getting the name of the script only stack an handler is in

William Prothero waprothero at gmail.com
Wed Jan 2 23:58:54 CET 2019


Bob:
I tried it. Yes:
put the name of me  —returns the name of the control that hosts the behavior script
put the name of this me —returns the name of the behavior script

Best,
Bill

> On Jan 2, 2019, at 11:34 AM, Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Ah yes then, me refers to the object the script belongs to. With behaviors, me refers to the *instance* of the script which is "owned" by the object being interacted with. "this me" refers to the actual behavior script. What you want is "this me". 
> 
> Bob S
> 
> 
>> On Jan 2, 2019, at 08:35 , prothero--- via use-livecode <use-livecode at lists.runrev.com> wrote:
>> 
>> Bob,
>> Thanks for the response. You are probably right, the filename of me should work. I don’t know whether it’s old age or not, but several times I have worked on a problem until I felt I had exhausted my ideas, posted a question to this list, then a solution immediately came to mind. If this happens, I will post an update with apologies. 
>> 
>> In the case you responded to, I was trying to find the name of the script only stack that contained the currently running handler. 
>> 
>> Put me into thisStack  —works fine
>> the short name of this stack —wrong, gives the name of the calling stack, in my case, anyway.
>> put the short name of the target —not it
>> 
>> “The target” is great for determining the control that initiated the script, but it does lose its original value when a “send in time” command is given, like commonly done during an animation.
>> 
>> Anyway, Bob, thanks for your response. 
>> 
>> William Prothero
>> http://es.earthednet.org
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list