mouseDown message sent but not triggering the handler in a behavior

Richmond richmondmathewson at gmail.com
Thu Jul 15 05:05:26 EDT 2010


On 07/15/2010 11:57 AM, Andre.Bisseret wrote:
> Bonjour,
>
> On a stack, in a group, I have a button which is supposed to show a 
> field on mouseDown and hide this same field on mouseUp.
>
> The two handlers (mouseDown and mouseUp) are in the script of a 
> behavior button to which the group is set.

Isn't that rather a complicated way of doing things?

I just made a stack and imported an img "iXYZ"'

and put this directly in a btn script:

on mouseDown
    set the vis of img "iXYZ" to true
end mouseDown

on mouseUp
    set the vis of img "iXYZ" to false
end mouseUp

and, needless to say, it works perfectly. In fact, many Thanks, it gives 
me an idea
for a "discovery stack" for the kids in my EFL school.

Why the need to put this in the script of a behavior button????
>
> When opening the stack, on a first mouseDown on the button, nothing 
> happens (the field is not shown).
>
> However, the message watcher shows that, after a mouseEnter message, a 
> mouseDown message is actually sent!
>
> Now, the field is shown as expected only on a second mouseDown! and 
> then all keeps been as expected: any subsequent mouseDown triggers the 
> visible of the field! (if I close the stack and reopen it, the same 
> phenomena is repeated).
>
> I have another button on the same card, with a similar handler 
> (showing a field on mouseDown and hide it on mouseUp) which works 
> normally. The difference is that for this one, the handler is directly 
> in the script of the button.
>
> Am I missing something about messages/handlers in behavior buttons?
>
> Any help would be much appreciated
>
> Best regards from Grenoble
>
> André
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list