On 7/23/12 9:34 PM, Kevin Perry wrote:
If there would be a way to tell NSDocument to forgo asking whether to save
a document if -isDocumentEdited returned YES, and instead just save it,
that would be a solution. All I want is a silent save, when only
preferences need to be saved (since I'm using file wrappers it would be
quick too because I'm only replacing the wrapper for my preferences).
I don't see how I could do that. Is there a way?
You're talking about the "Do you want to save changes to this document"
dialog when clicking the close button or quitting? The only way to bypass
that is to override canCloseDocumentWithDelegate:… check for your special
"-isDocumentEdited==YES, but don't show a panel" case, and invoke the
shouldCloseSelector (after writing the preferences file) without calling
super.
Thanks, I'll see if I can make this work, I'll report back.
Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com