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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to