Type Property

preservesVersions

Returns whether the document subclass supports version management.

Declaration

@property(class, readonly) BOOL preservesVersions;

Return Value

YES if the receiving subclass of NSDocument supports Versions; otherwise NO.

Discussion

The default implementation of this method returns [self autosavesInPlace]. You can override it and return NO to declare that NSDocument should not preserve old document versions.

Returning NO from this method disables version browsing and revertDocumentToSaved:, which rely on version preservation when autosaving in place. Returning YES from this method when autosavesInPlace returns NO will result in undefined behavior.

See Also

Configuring the Autosave Behavior

autosavesInPlace

Returns whether the receiver supports autosaving in place.

autosavesDrafts

Returns whether the document subclass supports autosaving of drafts.

autosavedContentsFileURL

The location of the most recently autosaved document contents.

autosavingFileType

Returns the document type to use for an autosave operation.

autosavingIsImplicitlyCancellable

Returns a Boolean value that indicates whether you can cancel an in-progress autosave operation.