Reply to topic  [ 1 post ] 
mouse() questions 
Author Message
Yorick Master

Joined: Wed Jun 01, 2005 11:34 am
Posts: 112
Post mouse() questions
I have two questions regarding the mouse() function.

The first question has to do with this passage from mouse's DOCUMENT statement:
Code:
Clicking a second button before releasing the first cancels the
mouse function, which will then return nil.
Ordinary text input also cancels the mouse function, which again
returns nil.

I have not been able to make either of these happen. If I click a second mouse button before releasing the first, the function appears to still return a non-nil result. If I type during the mouse wait, it does not interrupt or cancel; instead, I get the message "WARNING discarding keyboard input during window wait" and it continues to wait for me to click. In neither case do I get the nil result I expected. What am I misunderstanding?

My second question is, is there some way to gracefully handle the situation where a user closes all Yorick windows during a mouse() wait? Thus far, the only way two ways I have found to cancel a mouse wait is to click on a Yorick window or to use CTRL-C. The first is obviously impossible without windows, and the second will completely interrupt what you were doing. As a related feature request, would it be possible for Yorick to notice that the window that mouse() is waiting on has closed, and consequently return nil at that time?


Fri Mar 05, 2010 2:26 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.