Re: Quit application when window closes
Re: Quit application when window closes
- Subject: Re: Quit application when window closes
- From: Ron Fleckner <email@hidden>
- Date: Tue, 11 Mar 2008 21:44:56 +1100
On 11/03/2008, at 9:22 PM, Felipe Monteiro de Carvalho wrote:
Hello,
How can I implement the behavior that the application closes when my
window closes?
The application contains no nib files and doesn't use the interface
builder, it's every thing done by code.
thanks,
--
Felipe Monteiro de Carvalho
Make your application's main controller class a delegate of
NSApplication and implement - (BOOL)
applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)
theApplication and return YES
Ron
_______________________________________________
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