• 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
No windowWillClose: on quit?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

No windowWillClose: on quit?


  • Subject: No windowWillClose: on quit?
  • From: Camillo Lugaresi <email@hidden>
  • Date: Thu, 5 Jan 2006 11:45:48 +0100

Hello,

I have a window delegate that performs some cleanup in its windowWillClose: method. Everything works fine when the window is closed directly, but the method is not called when the application quits. The documentation suggests that this should happen automatically:

When the application object gets the go-ahead for termination, it closes any open window (among other things). This results in the invocation of the NSWindow delegation method windowWillClose: in which the delegate can perform any necessary tasks (clean-up, for example) related to the window.

(step 7 in Summary of Document-Saving Procedure at <http:// developer.apple.com/documentation/Cocoa/Conceptual/AppArchitecture/ Tasks/GracefulAppTermination.html#//apple_ref/doc/uid/20001280-1001887>)


However, it doesn't. The application delegate receives an applicationShouldTerminate: message, then an applicationWillTerminate:, but the window delegate never receives anything, although both the window and the delegate are still around at that time.

Is this normal?

Camillo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: How to create Daemon for Mac 10.4
  • Next by Date: Globaly unique NSManagedObjectID
  • Previous by thread: Re: How to create Daemon for Mac 10.4
  • Next by thread: NSDictionary allKeys and allValues clarification?
  • Index(es):
    • Date
    • Thread