Mouse polling answers for Scott

Richard Gaskin ambassador at FourthWorld.com
Wed Feb 27 19:37:01 EST 2002


Scott Raney writes:

> despite having seen statements from various people about the
> unreliability of the mouse function, we still *don't* have a
> reproducible example where it returns the wrong value.  If
> it's as common as some people seem to think it is, it should
> be possible to come up with such an example and send in a bug
> report so that it can be fixed.

We're working on it.  I haven't been able to recipe-ize it yet, but I can
assure you I get enough reports from my testers, and have seen it often
enough myself, that I know it's real.

It seems sporadic in nature, and given your description of the underpinning
on the OS side we can both appreciate the difficulty at tracking this down.

But I have to admit that instead of spending another hundred hours on the
issue (aggregate over the last couple years across various projects), it's
been much simpler to just "do things right", as you'd say, and rewrite the
handlers using mouseMove.  So my chances for tracking this down are reduced,
and for good reasons we both appreciate. :)

But the exercise of rewriting those routines leads us to this:

> But still vastly inferior to doing it the right way which is to use
> mouseDown/mouseUp/mouseRelease, possibly in combination with "send
> .. in" to implement a time out.  These are 100% reliable and will
> also greatly improve the responsiveness of your application.  Doing it
> this way would take no more lines of script than your example, though
> it does require thinking slightly differently about the problem.

Very much so.  It seems one way we can put this whole thing to rest happily
for everyone is to provude adquate education on the specifics of replacing
the asynch loop calls with mouseMove.

Can anyone provide an example of the check-the-mouse-within-a-loop method
that cannot be reproduced using mouseMove?

Or is there at least a handler you're having trouble with?  Maybe we could
rewrite your handler here, and in doing so lend a greater understanding of
the issue to everyone.

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Custom Software and Web Development for All Major Platforms
 Developer of WebMerge 1.9: Publish any Database on Any Site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the use-livecode mailing list