Closing a sheet
Closing a sheet
- Subject: Closing a sheet
- From: Andrea Salomoni <email@hidden>
- Date: Fri, 11 Nov 2005 16:45:52 +0100
Hi to all,
I have a problem closing an alert sheet.
I have this method:
-(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,
@selector(sheetDidEndShouldDelete:returnCode:contextInfo:),
NULL,
sender,
msg,
nil);
return NO;
}
and this one too:
- (void)sheetDidEndShouldDelete: (NSWindow *)sheet
returnCode: (int)returnCode
contextInfo: (void *)contextInfo
{
if (returnCode == NSAlertDefaultReturn)
{
[upgrade startDownloadingURL:self];
//mettere a posto per chiusura pannello di alert
[(NSWindow*)contextInfo close];
}
if (returnCode == NSAlertAlternateReturn)
{
//mettere a posto per chiusura pannello di alert
[(NSWindow*)contextInfo close];
}
}
But the sheet isn't attached to the main window and when I close the
sheet the main window is closed too.
Why? can someone tell me please?
sorry... just learning..
Andrea
_______________________________________________
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