the mouse

Dar Scott dsc at swcp.com
Fri Mar 8 15:37:01 EST 2002


(I'm new to rev and new to this list.  I downloaded rev a few days 
ago and my son immediately found that "the mouse" does not work as 
described in the documentation.  I wisked off a bug report.  And 
just now discovered that it has been a topic of discussion on 
use-revolution; this should be a lesson to me.)

I, too, think the documentation says that "the mouse" returns the 
state of the mouse at the call.  This opinion is not informed by 
heritage.

My opinion does not match the behavior of "the mouse".

Consider this script (which does not beep)...

on mouseUp
   repeat for 60 times
     put the mouse into field "mouseValue"
     --put the mouseClick into field "mouseClickValue"
     wait for 500 milliseconds
   end repeat
end mouseUp

During this 30 second test, when the mouse button is pressed the 
value of the field "mouseValue" changes to "down".  However, when 
it is released, it does not change to "up".

I think this is not the correct behavior.  If it isn't, I have what 
might be a temporary workaround. If it is, then "the mouseClick" 
interferes and thus there still is a bug.  (I also think "the 
mouseClick" has a problem, but it is probably a documentation 
problem.)

If the "--" is removed for the commented line, the function "the 
mouse" works as I expected.  (Or similar; my testing is light.)  If 
"the mouse" is to be fixed eventually, then one can make a 
temporary function with the workaround.

None of this is comment on whether the above handler represents 
good rev practice or style.  Perhaps the wait should include "with 
messages".

Dar Scott






More information about the use-livecode mailing list