• 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
Critical Alert - another question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Critical Alert - another question


  • Subject: Critical Alert - another question
  • From: John Nestor <email@hidden>
  • Date: Fri, 21 Dec 2001 13:20:43 -0500

I am using

NSString *msg = [... static string

NSBeginCriticalAlertSheet( @"Critical Alert!", @"Cancel", @"OK", nil, window, self,
@selector(sheetDidEnd: returnCode: contextInfo: ), nil, nil, msg);
and
- (void)sheetDidEnd:(NSWindow *)window returnCode:(int)result contextInfo:(void *)contextInfo

Works fine but I can't figure an elegant way to get the result of 'sheetDidEnd' into another function,
the window delegate 'windowShouldClose'.

'sheetDidEnd' returns void but I need a BOOL for 'windowShouldClose'.

I can use 'sheetDidEnd' to set an instance variable, eg BOOL doClose, from 'sheetDidEnd' and use it in 'windowShouldClose'.
I'm looking for a simpler way.

TIA, Jack Nestor


  • Prev by Date: Re: Silly question
  • Next by Date: Re: FW-UP Multiple NSWindowcontroller for the same NSDocument
  • Previous by thread: NSBorderlessWindowMask questions
  • Next by thread: Merry Christmas everyone
  • Index(es):
    • Date
    • Thread