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

Re: Hooking NSDocument close


  • Subject: Re: Hooking NSDocument close
  • From: Matt Neuburg <email@hidden>
  • Date: Fri, 14 Jun 2002 11:39:50 -0700

On Wed, 12 Jun 2002 16:31:29 -0500, Donald Brown <email@hidden> said:

>I need to catch when my document is about to go away (so I can save the user
>position). I've overridden canCloseDocumentWithDelegate to save my info and
>then call [super canCloseDocumentWithDelegate...], and this works when the
>document is closed (by clicking in the window's close box or choosing close
>from the menu). But, when the app quits, it's not called. Is there some
>other place I should be patching?

Have you considered the windowWillClose: notification?

Alternatively, have you considered overriding writeToFile:ofType:?

m.
--

matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
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.

  • Follow-Ups:
    • Re: Hooking NSDocument close
      • From: Donald Brown <email@hidden>
  • Prev by Date: Re: Memory Leak?
  • Next by Date: 8b color NSBitMapImageReps--no such thing?
  • Previous by thread: Hooking NSDocument close
  • Next by thread: Re: Hooking NSDocument close
  • Index(es):
    • Date
    • Thread