• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: terminates app when main window closes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: terminates app when main window closes


  • Subject: Re: terminates app when main window closes
  • From: John Joyce <email@hidden>
  • Date: Fri, 18 Jun 2010 05:21:53 -0500

On Jun 18, 2010, at 2:02 AM, Kyle Sluder wrote:

> 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
From the HIG:

In most cases, applications that are not document-based should quit when the main window is closed. For Example, System Preferences quits if the user closes the window. If an application continues to perform some function when the main window is closed, however, it may be appropriate to leave it running when the main window is closed. For example, iTunes continues to play when the user closes the main window.

Closing Windows



_______________________________________________

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

  • Follow-Ups:
    • Re: terminates app when main window closes
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >terminates app when main window closes (From: Angelo Chen <email@hidden>)
 >Re: terminates app when main window closes (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: terminates app when main window closes
  • Next by Date: Base class/subclass model in objective c
  • Previous by thread: Re: terminates app when main window closes
  • Next by thread: Re: terminates app when main window closes
  • Index(es):
    • Date
    • Thread