mouseDown message sent but not triggering the handler in a behavior
Andre.Bisseret
Andre.Bisseret at inria.fr
Thu Jul 15 07:38:03 EDT 2010
Le 15 juil. 10 à 11:44, Scott Rossi a écrit :
> Recently, Richmond wrote:
>
>> Just "for fun" I grouped the btn and put this in the script-editor of
>> the group:
>>
>> on mouseDown
>> put "Hello"
>> end mouseDown
>>
>> AND; when clicked the script in the button WAS executed, and the
>> script
>> in the group WAS NOT
>> executed.
>
>
> Because the script of the button intercepted the mouseDown message.
>
> btn -> group -> card -> stack
>
> The message hierarchy has several more options than this (see the list
> archives), but this applies to what you are doing.
>
> If you want the group mouseDown handler to trigger, you need to
> remove the
> button script, or pass the mouseDown message from the button by
> adding "pass
> mouseDown" to the button's script.
>
Bonjour Scott,
In my case, the script of the button is empty.
The handlers are in the script of the behavior to which the button is
set (in fact, I was wrong: it is not a behavior of the group of the
button; the behavior of the button is directly set to a behavior
button, sorry ;-).
This behavior button relates to several buttons with something like :
if the short name of the target is "suchButton" then
so that the message path is
button > behavior
What I don't understand is why the handler is not taken into account
on the first mouseDown message (which is actually sent) while it is
taken into account on any subsequent mouseDown message!
Best regards
André
More information about the use-livecode
mailing list