• 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: Quick Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quick Question


  • Subject: Re: Quick Question
  • From: Kyle Mandli <email@hidden>
  • Date: Fri, 3 Aug 2001 10:13:11 -0500

One thing to say first, Apple's philosophy on this subject is that a user should have a uniform experience throughout the entire operating system including any third part applications except it seems when it comes to applications specific to entertainment (QuickTime and iTunes are good examples.) I am not trying to dissuade you, just warning you that it isn't going to be as easy to do what you want then it seems it should be.

That being said, you need to make your main controller a delegate for the window that, on close, you want to shut the application down. Then when the method (found in NSWindow under "Methods Implemented By the Delegate") windowWillClose is called you can set some variable to say that the next time the program goes through the event loop or their is idle time or something (you may have to do something to NSRunLoop) you need to quit. Good Luck.

Kyle

On Friday, August 3, 2001, at 02:23 PM, stuartbryson wrote:

How do you make your application automatically quit when the main window is closed?

Thanks.

Stuart
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >Quick Question (From: stuartbryson <email@hidden>)

  • Prev by Date: Re: Accuracy of NSThread sleepUntilDate
  • Next by Date: Re: Vectors?
  • Previous by thread: Re: Quick Question
  • Next by thread: Re: Quick Question
  • Index(es):
    • Date
    • Thread