• 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: Quit on close Window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Quit on close Window? (From: Yann Bizeul <email@hidden>)

  • Prev by Date: Re: NSWorkspaceDidMountNotification usage
  • Next by Date: Cocoa/Applescript question
  • Previous by thread: Re: Quit on close Window?
  • Next by thread: GUI-less applications and autorelease pool never deallocated ?
  • Index(es):
    • Date
    • Thread