I am attempting to place a card script into back.
It appears that it when it is called, it is no longer in the context of the card that owns it.
So, the question is: What is the context?
TIA,
Dave
In what context does a backscript run?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: In what context does a backscript run?
It depends of what do you intend for context.
For example I have a button named button2 with this code:
then I type in the message box:
Now when I click on my stack I get: button "button2" of card id 1002 of stack "/home/max/temp/example.livecode"
So it's owner and context to me is the same, you can use properties as usual.
For example I have a button named button2 with this code:
Code: Select all
on mouseUp
answer the long name of me
end mouseUp
Code: Select all
insert script of button "button2" into back
So it's owner and context to me is the same, you can use properties as usual.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: In what context does a backscript run?
What Max said.
Just like behaviors, the target retains its "local" character, regardless of the place in the hierarchy where a message is ultimately trapped.
Craig
Just like behaviors, the target retains its "local" character, regardless of the place in the hierarchy where a message is ultimately trapped.
Craig