Constraining 'grab'

Ken Norris pixelbird at interisland.net
Thu Mar 7 00:13:01 EST 2002


on 3/6/02 8:25 AM, Jacqueline Landman Gay at jacque at hyperactivesw.com wrote:

> One common reason for needing to trap mouseRelease is because users change
> their minds. They will mouse down on a button, realize they don't really
> want to click it, and slide the mouse off the button before releasing. If
> the button script has a mousedown handler that changes the environment in
> any way, then trapping mouserelease will allow you to set everything back
> the way it was, even though a full mouseclick never happened.
----------
Ahh...this makes lotsa sense. A couple weeks a go, I watched a potential
user of an HC stack, who has a slight tremor response (the kind of thing I
often have to deal with), click a button with a mouseDown handler. He
realized he'd made a mistake, and in his excitedness to try to correct his
mistake, he accidentally released and pressed again while dragging the mouse
out of the button. In this case there was no terrible penalty or anything,
but it made me realize the potential hazard.

Using the two separate (mouseUp, mouseRelease) messages could have put the
situation in check and maybe even performed a kind of auto-reset, as you
suggest.

Like I mentioned to Geoff, I guess the best thing to do is set up some test
scenarios and watch the overall behavior.

Thanks,
Ken N.




More information about the use-livecode mailing list