Re: Quit on close Window?
Re: Quit on close Window?
- Subject: Re: Quit on close Window?
- From: Tom Sutcliffe <email@hidden>
- Date: Sun, 4 May 2003 19:00:07 +0100
I've always considered the 'correct' way to do this is by implementing
the Application delegate method
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication
*)theApplication {
return YES;
}
if only because it wins the 'longest method name in the entire world
that only takes one argument' award.
Regards,
Tom
On Sunday, May 4, 2003, at 05:22 pm, Yann Bizeul wrote:
Just register as an observer for NSWindowWillCloseNotification and
call [ NSApp terminate: self ]
Did I missed something ?
Le dimanche, 4 mai 2003, ` 17:57 Europe/Paris, Michael Hanna a icrit :
Like most things in Cocoa, the solution to this is probably obvious
and simple, but I'm not clear on how to do it. How do you set a
single-window, "MainMenu.nib" program to quit on closure of the >
window?
regards,
Michael
_______________________________________________
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.
_______________________________________________
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.