Behaviors and the message path

mwieder ahsoftware at sonic.net
Fri Dec 9 14:44:46 EST 2016


Tim-

I think it's wrong to consider behavior scripts as concatenated onto the end
of a script. If you rather think of the behavior script as a library or
backscript, then the message path becomes a little clearer. In your example
2, the message "you are in Script 3" appears because that instance of
ASharedHandlerName is in the same scope as TestScript, so it gets priority.
If you then assign the behavior, you still have the same result.

What happens when you uncomment the pass command is that control then passed
out of the Button A object into the next item down the message path, which
will be the behavior object. You should also have (untested because lazy)
the same result without assigning the behavior: you will get "you are in
Button A" followed by a "pass" statement that eventually ends up at the card
script and triggers "you are in Script 3".



-----
-- 
 Mark Wieder
 ahsoftware at gmail.com
--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Behaviors-and-the-message-path-tp4710941p4710968.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list