Constraining 'grab'

Ken Norris (dialup) pixelbird at
Thu Mar 7 19:02:01 EST 2002

on 3/7/02 1:04 AM, Scott Rossi at scott at wrote:

> Recently, Ken Norris (dialup) wrote:
>> How do you release the mouse button outside an object you're dragging? By
>> definition, it is within the dragged object, so it's a "mouseUp" situation,
>> unless you "beat the clock" by deliberately moving the cursor so fast that
>> the dragged object can't catch up, and are able to release the mouse button
>> before it does.
I was just trying to clarify the actual situation.
> The above situation is quite common.  This is why you must have a
> mouseRelease handler among your scripts.  I think Geoff already explained
> this, but here are some more examples:
Yes, I understood that, and the standardization of the procedure.
> 1) Like your example above, a very large or translucent object almost NEVER
> follows the mouse precisely; there is always a lag while the object tries to
> keep up with the mouse position, thus it is possible to release the mouse
> while it falls outside the rect of the dragged object.
> 2) If you drag an object but your cursor moves beyond the edge of the
> application window, your mouse no longer falls within the rect of the
> dragged object.
> 3) If you drag an object to the edge of a constraining region, the cursor
> will move outside the rect of the dragged object.
Good examples, thanks.
> The drag sample stack illustrates item 3 above.  If you still have not
> downloaded this stack, do so.  You'll probably find it useful.
This is the main thing. I was able to download the binary text, but I
haven't been able to convert it. I've tried several methods, option clicking
the link, etc., with no success. Any other suggestions?

It's fast becoming an easier thing to handwrite it into a script.

Best regards,
Ken N.

More information about the use-livecode mailing list