Closing alert sheet
Closing alert sheet
- Subject: Closing alert sheet
- From: Andrea Salomoni <email@hidden>
- Date: Fri, 11 Nov 2005 14:05:52 +0100
Hi to all,
I need to close a warning sheet after the app did some tasks.
I wrote something like this:
-(BOOL)startBootStrap:(NSWindow*)sender
{
NSString * msg = @"iPlane weather needs to upgrade the ICAO database.
\n Please upgrade the database before continue";
SEL sel = @selector(sheetClosed:returnCode:contextInfo:);
NSBeginAlertSheet(@"You need to upgrade your database...",
@"Upgrade",
@"Close",
nil,
sender,
self,
sel,
NULL,
sender,
msg,
nil);
return NO;
}
-(void)sheetClosed:(NSWindow*)sheet returnCode:(int)returnCode
contextInfo:(void*)contextInfo
{
if (returnCode == NSAlertDefaultReturn)
{
[upgrade startDownloadingURL:self];
[(NSWindow*)contextInfo close];
}
}
But when I close the sheet ... the main window app is closed with the
sheet
Why ?
Thank you all
_______________________________________________
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