• 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: NSDocument and quitting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument and quitting


  • Subject: Re: NSDocument and quitting
  • From: Stephen Magyari <email@hidden>
  • Date: Tue, 09 Dec 2003 19:47:32 -0800

You'll probably want the NSApp delegate method "applicationShouldTerminate"
or "applicationWillTerminate" (depending on how you want to implement your
cleanup).

See here for details:
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC
_classic/Classes/NSApplication.html

on 12/9/03 4:10 PM, James Mastro at email@hidden wrote:

> I have some data in my NSDocument subclass that needs to be cleaned up
> when quitting. One example being a temp folder that I need to delete. I
> tried doing this in dealloc, but it appears to not be called when
> quitting. It works fine when closing a document without quitting. Where
> can I put code that will definitely be called when the document goes
> away?
>
> -jim
> _______________________________________________
> 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: 
 >NSDocument and quitting (From: James Mastro <email@hidden>)

  • Prev by Date: Re: Live update of NSTextField in tool bar
  • Next by Date: Re: best way to save document level settings?
  • Previous by thread: NSDocument and quitting
  • Next by thread: Custom Checkbox NSButtons in TableViews à la i Cal (how to?)
  • Index(es):
    • Date
    • Thread