Re: Hooking NSDocument close
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.