Mouseup outside of a window

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Chilton
Posts: 10
Joined: Sat Aug 17, 2013 3:52 pm

Mouseup outside of a window

Post by Chilton » Fri Sep 19, 2014 3:21 pm

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

Klaus
Posts: 14198
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Mouseup outside of a window

Post by Klaus » Fri Sep 19, 2014 3:26 pm

HI Chilton,

use "mouserelease" instead/additionally!

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


Best

Klaus

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10323
Joined: Wed May 06, 2009 2:28 pm

Re: Mouseup outside of a window

Post by dunbarx » Fri Sep 19, 2014 6:10 pm

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

Post Reply