Mouse messages while down

Sarah Reichelt sarah.reichelt at gmail.com
Sun Mar 18 03:12:18 EDT 2007


> > I thought this sort of polling was not considered a good idea. It
> > seems fine on my 2GHz Intel Mac, but I'm not sure how it would go on
> > slower machines.
> >
> > It still seems odd that I can't get the data I need without having to do
> > this.
>
> Yeah, bad idea. At least, according to Mr. Raney. Sometimes it's the
> only way though.
>
> A more politically correct way is to use a mousemove handler. Set a
> script local when the mouse goes down or up. Then use mousemove to check
> whether the variable flag is set. If not, pass mousemove. If so, check
> the mouse location. Off the top of my head:
>

The top of your head worked fine thanks Jacque :-)

I'm now doing the politically correct mouseMove instead of using
repeat while mouse is down. But it still leaves me having to check the
location all the time to see whether it is inside one of my 400
buttons. It seems that the mouseControl should be able to report where
the mouse is without me having to check it manually. But mouseControl
gets stuck when you click down and never changes until the mouse comes
up again.

Thanks to everyone for their thoughts and suggestions.

Cheers,
Sarah



More information about the use-livecode mailing list