Instance Property

hasUnautosavedChanges

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

Declaration

var hasUnautosavedChanges: Bool { get }

Discussion

The value of this property is true if the document has changes that have not been autosaved; otherwise, the value is false. A document has unsaved changes when the updateChangeCount(_:) method has been called since the last save.

See Also

Autosaving

func checkAutosavingSafety()

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

func scheduleAutosaving()

Schedules periodic autosaving for the purpose of crash protection.

func autosave(withImplicitCancellability: Bool, completionHandler: (Error?) -> Void)

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

class var autosavesInPlace: Bool

Returns whether the receiver supports autosaving in place.

class var autosavesDrafts: Bool

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

class var preservesVersions: Bool

Returns whether the receiving subclass of NSDocument supports Versions.

func browseVersions(Any?)

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

var autosavingFileType: String?

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

var autosavingIsImplicitlyCancellable: Bool

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

var autosavedContentsFileURL: URL?

The location of the most recently autosaved document contents.