Enumeration

NSDocumentChangeType

Values that indicate a document’s edit status.

Declaration

typedef enum NSDocumentChangeType : NSUInteger {
    ...
} NSDocumentChangeType;

Overview

These constants indicate how a document should operate on its change count and are passed to the updateChangeCount: method.

Topics

Constants

NSChangeDone

Increment change count. Pass this value to the updateChangeCount: method to indicate that a single change has been done. For example, the built-in undo support in the NSDocument class passes this value whenever a document receives an NSUndoManagerDidCloseUndoGroupNotification notification from its own undo manager.

NSChangeUndone

Decrement change count. A single change has been undone. For example, the built-in undo support of NSDocument passes this value whenever a document receives an NSUndoManagerDidUndoChangeNotification from its own undo manager.

NSChangeCleared

Set change count to 0. The document has been synchronized with its file or file package. For example, saveToURL:ofType:forSaveOperation:error: passes this value for a successful NSSaveOperation or NSSaveAsOperation. The revertDocumentToSaved: method does too.

NSChangeReadOtherContents

The document has been initialized with the contents of a file or file package other than the one whose location is in the fileURL property, and therefore can’t possibly be synchronized with its persistent representation. For example, initForURL:withContentsOfURL:ofType:error: passes this value when the two passed-in URLs are not equal to indicate that an autosaved document is being reopened.

NSChangeAutosaved

The document’s contents have been autosaved. For example, saveToURL:ofType:forSaveOperation:error: passes this value for a successful NSAutosaveOperation.

NSChangeRedone

A single change has been redone. For example, the built-in undo support of NSDocument passes this value whenever a document receives an NSUndoManagerDidRedoChangeNotification from its own undo manager.