mouse bug?

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jwkuehne
Posts: 37
Joined: Wed Nov 28, 2007 3:12 am

mouse bug?

Post by jwkuehne » Wed Nov 28, 2007 6:39 pm

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?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Nov 28, 2007 9:38 pm

jwkuehne,

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

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

jwkuehne
Posts: 37
Joined: Wed Nov 28, 2007 3:12 am

Post by jwkuehne » Wed Nov 28, 2007 10:26 pm

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

Post Reply

Return to “Mac OS”