Two clicks to dismiss a sheet?
Two clicks to dismiss a sheet?
- Subject: Two clicks to dismiss a sheet?
- From: Tito Ciuro <email@hidden>
- Date: Sat, 16 Sep 2006 04:42:29 -0700
Hello,
After I display a sheet, it take two clicks to dismiss it. Any idea
why? This is the code:
id alertSheet = NSGetCriticalAlertPanel(@"Title", @"Msg", @"OK",
@"Cancel", nil);
[NSApp beginSheet: alertSheet
modalForWindow: window
modalDelegate: nil
didEndSelector: nil
contextInfo: nil];
int choice = [NSApp runModalForWindow: alertSheet];
[NSApp endSheet: alertSheet];
[alertSheet orderOut: self];
NSLog(@"Sheet has been dismissed with button: %i", choice);
If I want to dismiss it with the 'Esc' or 'Return' key, I have to
press the key twice. Why is that?
Thanks!
-- Tito
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden