Re: App Will Not Terminate After Uncaught Excpetion
Re: App Will Not Terminate After Uncaught Excpetion
- Subject: Re: App Will Not Terminate After Uncaught Excpetion
- From: "email@hidden" <email@hidden>
- Date: Thu, 16 Dec 2010 20:41:21 +0000
On 16 Dec 2010, at 19:24, Andreas Grosam wrote:
> On Dec 16, 2010, at 5:32 PM, Nick Zitzmann wrote:
>> See <https://github.com/omnigroup/OmniGroup/blob/master/Frameworks/OmniAppKit/OAApplication.m> for one such example.
> Thank you very much, this is exactly what I'm looking for! :)
>
>
This is something that has had me scratching my upper organ casing too.
The NSApplication docs state that NSApplicationMain is functionally similar to:
void NSApplicationMain(int argc, char *argv[]) {
[NSApplication sharedApplication];
[NSBundle loadNibNamed:@"myMain" owner:NSApp];
[NSApp run];
}
Presumably it is more functionally similar to:
void NSApplicationMain(int argc, char *argv[]) {
[NSApplication sharedApplication];
[NSBundle loadNibNamed:@"myMain" owner:NSApp];
while(YES) {
@try {
[NSApp run];
return;
} @catch (NSException *e) {
[NSApp reportException:e]
}
}
}
Note that the docs also say:
The global application object uses autorelease pools in its run method; if you override this method, you’ll need to create your own autorelease pools.
Regards
Jonathan Mitchell
Developer
Mugginsoft LLP
http://www.mugginsoft.com_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden