Quantcast

Stack References When Fired in Backscripts/Libraries

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Stack References When Fired in Backscripts/Libraries

prothero--- via use-livecode
I was (happily) surprised today when  in a handler in a library that was put into use on init of the app

that a handler in

lib_initMyApp.livecodescript  # now in the msg hierarchy

on bakeBread pDaKin
   put the name of this stack
end bakeBread

Then in a top level binary stack name… e.g.

baking.livecode

if we call  "bakeBread"

we see

stack "baking.livecode"

in the msg box and not

lib_initMyApp.livecodescript

ergo "this stack" in a script only text stack in the message path is not seen as "itself"
but actually the target script from whence the command was issued.

So this means we don't have to parse for "the target"  yay!

Am I right? Is this dependable moving forward? Any caveats?

BR

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Stack References When Fired in Backscripts/Libraries

prothero--- via use-livecode
You are correct sir. The context is from the calling stack/card/control. The only thing I have run into is callbacks (scrollerdidscroll on mobile for example) that are "targeted" to the stack that requested them.
See http://quality.runrev.com/show_bug.cgi?id=15018 "Native mobile controls bind themselves to 'me' at the point they are created and this is where they send their messages."

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]


-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf Of Sannyasin Brahmanathaswami via use-livecode
Sent: Wednesday, March 29, 2017 11:51 PM
To: How LiveCode
Cc: Sannyasin Brahmanathaswami
Subject: Stack References When Fired in Backscripts/Libraries

I was (happily) surprised today when  in a handler in a library that was put into use on init of the app

that a handler in

lib_initMyApp.livecodescript  # now in the msg hierarchy

on bakeBread pDaKin
   put the name of this stack
end bakeBread

Then in a top level binary stack name… e.g.

baking.livecode

if we call  "bakeBread"

we see

stack "baking.livecode"

in the msg box and not

lib_initMyApp.livecodescript

ergo "this stack" in a script only text stack in the message path is not seen as "itself"
but actually the target script from whence the command was issued.

So this means we don't have to parse for "the target"  yay!

Am I right? Is this dependable moving forward? Any caveats?

BR

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...