MouseMove message interrupted when I change cards

Matt Maier blueback09 at gmail.com
Tue Nov 10 23:25:01 EST 2015


Dude, the mouseMove messages suck. Like it always sends a mouseMove after
mouseDown, whether or not the mouse moved. And there are other things that
either block mouseMove from being sent, or send it only to the original
control, or some other exception. If you try to do anything unusual based
on mouse handlers you'll probably find that it doesn't work.

I had to write my own logic for tracking the mouse location. I just collect
up mouseMove and mouseEnter and all the rest of them and send them to a
handler that compares the mouseLocation to the rects of all the controls
I'm interested in.

This is the core of the logic:
if within([long id of some graphic],the mouseloc) then [whatever]
Just repeat for all the controls you're worried about.

On Tue, Nov 10, 2015 at 7:38 PM, David Epstein <dfepstein at comcast.net>
wrote:

> Among the controls in a group with background behavior I have a “quick
> browse” control — a polygon graphic whose many rectangular parts represent
> cards in the stack.  I handle “mouseEnter” and “mouseMove”, and use the
> mouseH to calculate which card to go to.
> I find that the “mouseMove” message is interrupted when I change cards.
> Even though the mouse is moving across what looks like the same graphic, LC
> seems to treat each card’s representation of that graphic as a separate
> control.  Thus when a mouseMove causes navigation to a different card, no
> more mouseMove messages are received, unless I move the mouse out of and
> back into the control.
> Is this how things should work?  Do I need to move my control to a palette
> so that the change of card that it triggers does not interrupt its own
> operation?  Are there other options?
>
> David Epstein
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list