• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Closing a sheet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Closing a sheet
      • From: j o a r <email@hidden>
  • Prev by Date: Re: -[NSURL path] returning empty string for relative file URL
  • Next by Date: Re: NSButton with a delayed popup-menu?
  • Previous by thread: NSMenu's window commands are automagically greyed out...
  • Next by thread: Re: Closing a sheet
  • Index(es):
    • Date
    • Thread