On Jul 23, 2012, at 8:12 AM, Markus Spoettl <[email protected]> wrote:

> Are there better options to do a last-minute save? I do not want to change 
> the design, meaning I don't want preferences to contribute to the change 
> count state or even worse be undoable. Plus I do want the preferences to be 
> stored in the package, not someplace else (restoration state for example).

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.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to