Re: terminates app when main window closes
Re: terminates app when main window closes
- Subject: Re: terminates app when main window closes
- From: Angelo Chen <email@hidden>
- Date: Fri, 18 Jun 2010 22:16:26 +0800 (HKT)
Thanks, applicationShouldTerminateAfterLastWindowClosed works.
Now I'd like to prompt user if he really wants to quit, if not, return NO, that seems working as well.
--- 2010年6月18日 星期五,Kyle Sluder <email@hidden> 寫道﹕
寄件人: Kyle Sluder <email@hidden>
主題: Re: terminates app when main window closes
收件人: "Angelo Chen" <email@hidden>
副本(CC): email@hidden
日期: 2010年6月18日,星期五,下午3:02
On Thu, Jun 17, 2010 at 11:41 PM, Angelo Chen
<email@hidden> wrote:
> I have a non document based application, I quit the app by sending terminate to NSApplication(file owner). if I close the main window, application will not be closed, what I'd like is, when user close the main window, application also terminates, possible? Thanks,
Non-document-based apps typically don't do this.
That said, look at -applicationShouldTerminateAfterLastWindowClosed:
in the NSApplicationDelegate protocol.
--Kyle Sluder
_______________________________________________
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