Critical Alert - another question
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