Polling the mouse state

Geoff Canyon gcanyon at inspiredlogic.com
Thu Feb 21 01:48:01 EST 2002

At 8:56 PM -0800 2/20/02, Ken Norris (dialup) wrote:
>on 2/20/02 6:50 AM, Jim Hurley at jphurley at jps.net wrote:
>> This issue of polling the mouse state continues to crop up. I have
>> had to avoid the use of the old HyperCard standby:
>> "repeat while the mouse  is down"
>I love "repeat while the mouse is down" because it allows me to do a bunch
>of mouseDown stuff, then a bunch of mouseUp stuff when the repeat ends, all
>in one handler.
>I'm working on an HC stack right now that uses it. Never had a problem in
>HC, except with the occasional bonk in an idle handler, but NEVER in a
>repeat loop.
>Does 'grab' and 'mousemove' really have potential response speed problems in
>RR/MC? I have some HC stacks I want to convert where a 'hunting' button is
>tied to the cursor. This ability is key to the stack's function, no good
>without it.

As far as i know, "grab" is fine to use -- it's just that you get no messages while it is in effect.

MouseMove is a good answer if you need to respond to messages while you're moving something.

"Repeat while the mouse is down" has been deprecated (meaning that you can't depend on it continuing as a part of Revolution) and even now doesn't work as well in Revolution as it does in HyperCard.

If you have a specific need that seems to require "repeat while the mouse is down," post it and we'll see if we can figure a way around it.



More information about the Use-livecode mailing list