Instance Property

autosavingIsImplicitlyCancellable

A Boolean value indicating whether autosaving is happening now but could be safely cancelled.

Declaration

@property(readonly) BOOL autosavingIsImplicitlyCancellable;

Discussion

The value of this property is YES if autosaving is in progress but nothing bad would happen if it were cancelled. For example, when periodic autosaving is being done only for crash protection, which doesn’t need to be done all of the time, this property is set to YES. When autosaving is being done because the document is being closed, the property is set to NO.

When the value is YES, your document-writing code can invoke unblockUserInteraction after recording the fact that changes to the document model made by the user should first cancel the rest of the writing. Your code that makes changes to the document model then must always do that cancellation first. If your writing code is implicitly cancelled in this way, it should set the NSError object passed by reference to the writing method to NSUserCancelledError in NSCocoaErrorDomain.

See Also

Autosaving

- checkAutosavingSafetyAndReturnError:

Returns a Boolean value indicating whether it is probably safe to autosave document changes.

- scheduleAutosaving

Schedules periodic autosaving for the purpose of crash protection.

hasUnautosavedChanges

A Boolean value indicating whether the document has changes that have not been autosaved.

- autosaveDocumentWithDelegate:didAutosaveSelector:contextInfo:

Autosaves the document’s contents at an appropriate location.

- autosaveWithImplicitCancellability:completionHandler:

Autosaves the document’s contents at an appropriate location if it needs autosaving.

autosavesInPlace

Returns whether the receiver supports autosaving in place.

autosavesDrafts

Returns whether the receiving subclass of NSDocument supports autosaving of drafts.

preservesVersions

Returns whether the receiving subclass of NSDocument supports Versions.

- browseDocumentVersions:

Opens the Versions browser in the document’s main window.

autosavingFileType

Returns the document type that should be used for an autosave operation.

autosavedContentsFileURL

The location of the most recently autosaved document contents.