Behaviors

Beat Cornaz B.Cornaz at gmx.net
Mon Oct 26 06:10:57 EDT 2009


Beat wrote :
 >A couple of btns have a behavior (DoA) assigned for mouseUp. Now
 >one of the buttons has an additional task to perform on mouseUp
 >(DoB). 'DoA' needs to be done before 'DoB'.

Mark Wieder wrote :

 >Use the dispatch command in the behavior object:

 >on mouseUp
 > DoA
 > dispatch "DoB"
 >end mouseUp

Thanks Mark. The problem is though that the 'DoA' is in the behavior  
script inside a 'mouseUp'.

The script of the behavior button :
on mouseUp
DoA
end mouseUp

Because my button to click also has a mouseUp, it will not reach the  
mouseUp handler in the behavior script. It only does if I 'pass  
mouseUp'. But then the order is wrong (I can only 'pass mouseUp' at  
the end of my mouseUp handler in the button to click, so after DoB  
has been executed. But the behavior script (with DoA inside the  
mouseUp) needs to run first.


Thanks,
Beat




More information about the use-livecode mailing list