Re: applicationShouldTerminateAfterLastWindowClosed
Re: applicationShouldTerminateAfterLastWindowClosed
- Subject: Re: applicationShouldTerminateAfterLastWindowClosed
- From: Steve Palmer <email@hidden>
- Date: Wed, 11 Feb 2004 04:23:26 +0000
I set this in -(void)awakeFromNib in my AppController class. I also
connected File's Owner to AppController in IB which would presumably
make doing setDelegate redundant.
The delegate code is:
-(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication
*)theApplication
{
return YES;
}
I verified that the delegate is never called. I put a breakpoint on
this and close the one window that the application creates, and the
delegate never gets called. Instead, I tried:
-(void)windowWillClose:(NSNotification *)notification
{
[NSApp terminate:nil];
}
and that worked fine.
- Steve
On Feb 10, 2004, at 12:14 AM, Andreas Mayer wrote:
>
Am 09.02.2004 um 03:44 schrieb Steve Palmer:
>
>
> I set [NSApp setDelegate:self] in my app controller
>
>
*Where* do you set this? Is that code executed at all?
>
>
>
bye. Andreas.
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.