Page 1 of 1

Mouseup outside of a window

Posted: Fri Sep 19, 2014 3:21 pm
by Chilton
Hi,

I noticed that if a user clicks on something, then drags outside the bounds of the window, I do not receive a mouseup event when they let go of the mouse.

How can I detect a mouseup event outside of the window bounds, when the mousedown event started within the window bounds?

I'm not trying to detect clicks in other apps, just my own. Workarounds are fine, too.

Thank you,
-Chilton

Re: Mouseup outside of a window

Posted: Fri Sep 19, 2014 3:26 pm
by Klaus
HI Chilton,

use "mouserelease" instead/additionally!

Here some great learning resources for Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html


Best

Klaus

Re: Mouseup outside of a window

Posted: Fri Sep 19, 2014 6:10 pm
by dunbarx
What Klaus said.

But is not just when you click on a control and, before releasing, drag the cursor outside the window. It is actually that you have dragged outside the rect of the target control itself. Now if you clicked on the card, but on no control, then the window rect rules.

Just so you understand that "mouseUp" has to happen while the mouseLoc is within the same rect of the object that, what you might consider as the "mouseDown" action initially took place. You can actually click on a control, and while holding the mouse down, move off that control and then move back. If your release at that time, the message fires. So the idea that both actions have to occur within the same object is the one you need to learn.

Unless you already knew all that...

Craig Newman