Page 1 of 1

mouse bug?

Posted: Wed Nov 28, 2007 6:39 pm
by jwkuehne
Under certain conditions a button will not receive mouseUp when the mouse is lifted in the button, and the button will continue to issue a stream of mouseStillDown messages. The hilite stays true. Also, there is no mouseRelease message. I have only seen this in OS X with RR 2.6.1 and 2.8.1.

This occurs when you have a handler like

on getData
write "xxx" to socket "y"
read from socket "y" for 128
put it
send getData to me in 250 milliseconds
end getData

It seems that if the mouse is lifted while in the socket commands, the mouseUp message is never sent and RR thinks the mouse is depressed, even though "the mouse" is "up". Attempting to do non-blocking reads, with

read from socket "y" for 0

does not help. I don't see this problem in Windows standalones generated from the Mac.

Any ideas how to avoid this?

Posted: Wed Nov 28, 2007 9:38 pm
by Mark
jwkuehne,

This is not a bug. Your script still blocks while reading from the socket. Try "read... with message..." instead.

Best,

Mark

Posted: Wed Nov 28, 2007 10:26 pm
by jwkuehne
You are right! It works quite well to set up the socket write and read with callback messages. I'm glad I asked and I'm even more glad you told.

-John