Behaviors and the message path

Mark Waddingham mark at livecode.com
Mon Dec 12 10:38:57 CET 2016


On 2016-12-09 19:44, Bleiler, Timothy wrote:
> I still have one question though. Given the part of your answer I
> quoted above, why does the “pass” control structure trigger handlers
> along the behavior chain rather than skipping over them and going to
> the next object in the ownership chain?

Because it is helpful for it to do so.

Either 'pass' could act as you say and skip the entire behavior chain; 
or it could do as it currently does and pass to the next script in the 
list of things which might want to process the message.

Given the utility of pass in the exisiting message path, it seemed 
sensible that it should do the 'similar' thing in the behavior chain. As 
currently implemented, it means that you can get a whole list of things 
to 'do something' on a particular event; should each one pass (just as 
you can with the 'normal' message path).

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps



More information about the use-livecode mailing list