Stack References When Fired in Backscripts/Libraries

Sannyasin Brahmanathaswami brahma at hindu.org
Wed Mar 29 23:51:00 EDT 2017


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



More information about the use-livecode mailing list