On Feb 25, 2017, at 10:41 , Markus Spoettl <ms_li...@shiftoption.com> wrote:
> 
> I looked at what happens when the application quits and
> 
> - (BOOL)revertToContentsOfURL:ofType:error:
> 
> is called. The absoluteURL passed in is the original file URL. So it's not 
> surprising that this call doesn't actually revert any change. It's the latest 
> version that autosave put there, overwriting the original.
> 
> Do I have to use +preservesVersions=YES  make this work (this means, 
> reverting actually does what it says)?

It seems to me there was a discussion about what happens when you quit with 
unsaved changes, and it seemed that the quit mechanism was doing things in the 
wrong order, so that you can’t actually prevent a save. (But I might be 
misremembering the exact nature of the discussion.)

It also seems to me that setting the preference to ask about closing documents, 
in combination autosavesInPlace==YES, produces a UI inconsistency. Surely the 
Revert button should be a Don’t Save button.

Also, the documentation for “preservesVersions” says:

> Returning false from this method disables version browsing and 
> revertToSaved(_:), which rely on version preservation when autosaving in 
> place.


IOW, you can’t expect reverting to revert in your situation.

_______________________________________________

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

Reply via email to