Re: NSDocument -canCloseDocumentWithDelegate::: not called when terminating
Re: NSDocument -canCloseDocumentWithDelegate::: not called when terminating
- Subject: Re: NSDocument -canCloseDocumentWithDelegate::: not called when terminating
- From: Markus Spoettl <email@hidden>
- Date: Mon, 23 Jul 2012 19:51:34 +0200
On 7/23/12 6:22 PM, Kyle Sluder wrote:
I don't have my crazy autosave flowchart handy, but I *think* you should be
able to simply override -hasUnautosavedChanges to return YES if either super
returns YES or if your preferences file needs to be saved.
-autosaveWithImplicitCancellability:: is documented to check
-hasUnautosavedChanges, so I would assume that it is called unconditionally
at all places where AppKit wants to ensure the document is written to disk if
necessary.
Of course, this assumes you are returning YES from +autosavesInPlace.
Thanks for the idea, I'll think about that. Not using autosavesInPlace right
now, but if it's the ticket to making this work, it may be worth reconsidering.
I'm not a big fan of the feature, though.
Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden