unexpected messages
David Cragg
dcragg at blueyonder.co.uk
Sun Apr 27 23:55:00 EDT 2003
At 9:46 pm -0700 26/4/03, Bob Rasmussen wrote:
>I genuinely appreciate the effort Dave, but that's still not the case I
>reported. The "mouseMove" message that your example demonstrates does indeed
>occur before the "mouseDown". However, the extra one I observed occurred
>*after* the "mouseDown" had already executed several statements and before the
>remaining statements in the "mouseDown" handler completed. It happened, in
>fact, coincident with a "hide" statement *inside* the "mouseDown" handler. I
>know this, because my handlers looks something like the following after a few
>diagnostic items are added akin to your example:
>
> local lvEvents, mouseIsDown
>
>
> on mouseDown
> put true into mouseIsDown
> put "mouseDown enter" & cr after lvEvents
>
> -- several statements, which among other things makes a new group within
>an existing group using a "copy" command
>
> put "before hide" & cr after lvEvents
> hide anObject
> put "after hide" & cr after lvEvents
>
> -- several more statements
>
> put "mouseDown exit" & cr after lvEvents
> end mouseDown
>
>
> on mouseMove h, v
> if mouseIsDown then
> put "mouseMove <--" & cr after lvEvents
>
> -- several more statements
>
> end if
> end mouseMove
>
>
> on mouseUp
> put false into mouseIsDown
> put "mouseUp" & cr after lvEvents
> put lvEvents
> put empty into lvEvents
>
> -- several more statements
>
> end mouseUp
>
>
>What shows up in the message box is this:
>
> mouseDown enter
> before hide
> mouseMove <--
> after hide
> mouseDown exit
> mouseMove <--
> mouseMove <--
> mouseMove <--
> mouseUp
>
>
>Take a look at the third line. I hope this makes my situation clearer now.
I agree. It looks a puzzler.
But I can't reproduce that event sequence here by just using simple objects.
Do you have the above script in a single object (e.g. a button) or in a group?
Is the target for the events always the same? Check by adding "the
target" to the trace lines. e.g.:
put "mouseMove" && the target & cr after lvEvents
Cheers
Dave
More information about the use-livecode
mailing list