Trapping for mouseDown on the desktop on a Mac
dunbarx at aol.com
dunbarx at aol.com
Sun Oct 13 14:04:31 EDT 2013
Or another "polling" thing, if this helps at all:
on mouseUp
checkForMouseDown
end mouseUp
on checkForMouseDown
if the mouse is down then
answer "Mouse is down"
exit to top
end if
--doSomeProcess
checkForMouseDown
end checkForMouseDown
Now when you run this and click in the finder, LC butts in because of the dialog. But you can do something else less obtrusive.
Craig Newman
-----Original Message-----
From: Ken Ray <kray at sonsothunder.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Sun, Oct 13, 2013 12:49 pm
Subject: Re: Trapping for mouseDown on the desktop on a Mac
How about going into a polling mode, checking the dragData["files"] every second
or so... it should start out empty, but as soon as the user starts to drag a
file from the desktop, it should have something in it.
Just a thought,
Ken Ray
Sons of Thunder Software
> On Oct 12, 2013, at 11:25 AM, Ray <ray at linkit.com> wrote:
>
> Phil - thanks for the suggestion but I just tried it and no-can-do. For some
reason, and this is a Mac-only behavior, when I mouseDown on the desktop I can't
see any messages at all which are sent to Livecode. The suspend message is sent
if I mouseDown on another stack, but not on a file on the desktop or the desktop
itself.
>
> Let me know if anything else comes to mind.
>
> Thanks,
>
> Ray
>
>> On 10/12/2013 10:51 AM, Phil Davis wrote:
>> Have you tried using 'suspend' instead of 'mouseDown' and 'suspendStack'?
Should work the same on both platforms (famous last words!).
>>
>> Phil
>>
>>
>>> On 10/12/13 6:31 AM, Ray wrote:
>>> On Windows the instant there is a 'mouseDown' on the desktop the current
stack window goes inactive, thus triggering the suspendStack message. I use
this to create a field which then accepts dragDrops. However, this is different
on a Mac. The current stack window on a Mac waits until the mouse comes up on a
desktop click, thus defeating my scheme which creates the field to accept a
dragDrop as soon as the mouse goes down on the desktop.
>>>
>>> Any ideas anybody on how to trap for a mouse down on the desktop on a Mac?
>>>
>>> Many thanks,
>>>
>>> Ray
>>> LinkIt! Software
>>>
>>> _______________________________________________
>>> 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
>
>
> _______________________________________________
> 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
_______________________________________________
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