Drag command--does this seem right?
Devin Asay
devin_asay at byu.edu
Wed Dec 21 15:42:49 EST 2016
Actually, what I meant to say is:
On Dec 21, 2016, at 1:38 PM, Devin Asay <devin_asay at byu.edu<mailto:devin_asay at byu.edu>> 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
use-livecode at lists.runrev.com<mailto: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
Devin Asay
Director
Office of Digital Humanities
Brigham Young University
More information about the use-livecode
mailing list