NSMatrix mouse puzzle
NSMatrix mouse puzzle
- Subject: NSMatrix mouse puzzle
- From: "D.K. Johnston" <email@hidden>
- Date: Wed, 3 Sep 2008 21:40:40 -0700
I've got a matrix of buttons in a window that I want to disable for a
short period, while data is being displayed. So I wrote something like
this:
[theMatrix setEnabled:NO];
// wait 10 seconds
NSUInteger i = 0, resume = time( nil ) + 10;
while( i < resume )
index = time( nil );
[theMatrix setEnabled:YES];
But when I click the buttons during that 10-second waiting period, the
clicks are sent to the matrix anyway. (I know this because a click-
counter is incremented.)
Why is this happening? Is it because the matrix doesn't get the
message until later in the run loop? Any ideas about how I can get the
desired result?
I tried setting a "waiting" flag that's monitored by the method that
processes the clicks, but that didn't work either.
dkj
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden