• 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 alert sheet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Closing alert sheet
      • From: Peter Borg <email@hidden>
    • Re: Closing alert sheet
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Progress bar
  • Next by Date: Re: Closing alert sheet
  • Previous by thread: [Binding] NSObjectController content
  • Next by thread: Re: Closing alert sheet
  • Index(es):
    • Date
    • Thread