Devin.
I don't see it that way. The "mouseMove" message is sent continuously and "me"
is always going to be the card, since that is where the handler lives. Try
moving the handler to the stack script. You will need to modify it a little:
on mouseMove
put ""
wait 1
put me
--if the target <> me then
if the optionkey is down then grab the target
--end if
end mouseMove
because the "target" is not really applicable from there. but "me" still is.
Craig Newman
-----Original Message-----
From: Devin Asay <[email protected]>
To: How to use LiveCode <[email protected]>
Sent: Wed, Dec 21, 2016 3:44 pm
Subject: Re: Drag command--does this seem right?
Actually, what I meant to say is:
On Dec 21, 2016, at 1:38 PM, Devin Asay
<[email protected]<mailto:[email protected]>> wrote:
Hi all,
I just accidentally discovered something curious:
Given a card with a any control object on it, and the following two handlers in
the card script, the outcome is identical:
Given a card with any control object on it, and either of the following two
handlers in the card script, the outcome is identical:
on mouseDown
if the target <> me then
grab the target
end if
end mouseDown
on mouseMove
if the target <> me then
grab the target
end if
end mouseMove
In other words, when you click down on an object that isn’t the card itself,
the object follows the mouse until you release it.
This is not what I would expect. I would expect that the mouseDown handler
works as I described, but that the mouseMove handler would grab a control as
you moved over it and follow it around. I’m not saying that’s a desirable
thing, just what I would expect.
The Dictionary says,”Use the grab command within a mouseDown handler to drag an
object around the stack window without selecting it.” That implies that grab
was only intended to work on mouseDown. When grab happens in a mouseMove
handler it seems to generate an implicit mouseDown.
So my question is, is this a bug, a quirk, or a feature? If it’s a bug, I file
a report.
Devin
Devin Asay
Director
Office of Digital Humanities
Brigham Young University
_______________________________________________
use-livecode mailing list
[email protected]<mailto:[email protected]>
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Devin Asay
Director
Office of Digital Humanities
Brigham Young University
_______________________________________________use-livecode mailing
[email protected] visit this url to subscribe,
unsubscribe and manage your subscription
preferences:http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode