Laid down the scaffolding for application termination on Mac OS X.
This commit is contained in:
parent
86a4b0a7ba
commit
3d714e03c1
|
@ -1,6 +1,8 @@
|
||||||
// 6 april 2015
|
// 6 april 2015
|
||||||
#import "uipriv_darwin.h"
|
#import "uipriv_darwin.h"
|
||||||
|
|
||||||
|
static BOOL canQuit = NO;
|
||||||
|
|
||||||
@interface applicationClass : NSApplication
|
@interface applicationClass : NSApplication
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@ -17,6 +19,9 @@
|
||||||
|
|
||||||
// for debugging
|
// for debugging
|
||||||
NSLog(@"in terminate:");
|
NSLog(@"in terminate:");
|
||||||
|
|
||||||
|
if (!canQuit)
|
||||||
|
complain("call to [NSApp terminate:] when not ready to terminate");
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -33,6 +38,7 @@
|
||||||
{
|
{
|
||||||
// for debugging
|
// for debugging
|
||||||
NSLog(@"in applicationShouldTerminate:");
|
NSLog(@"in applicationShouldTerminate:");
|
||||||
|
canQuit = YES;
|
||||||
return NSTerminateNow;
|
return NSTerminateNow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue