Re: Two clicks to dismiss a sheet?
Re: Two clicks to dismiss a sheet?
- Subject: Re: Two clicks to dismiss a sheet?
- From: Nick Zitzmann <email@hidden>
- Date: Sat, 16 Sep 2006 15:25:00 -0600
On Sep 16, 2006, at 5:42 AM, Tito Ciuro wrote:
After I display a sheet, it take two clicks to dismiss it. Any idea
why?
You're running a sheet as an application-modal window. Sheets are
window-modal, not application-modal. Try this instead: (pseudo-code
written in Mail; it won't compile)
- (void)someMethod
{
NSBeginCriticalAlertSheet(@"title", nil, nil, nil, window, self,
@selector(sheetDidEnd:returnCode:contextInfo:), NULL, NULL, @"message");
}
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode
contextInfo:(void *)contextInfo
{
// do something here if you want to, then...
[sheet orderOut:self];
}
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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