Change counts indicate a document’s edit status. These constants indicate how a document should operate on its change count and are passed to updateChangeCount:.
Available in Mac OS X v10.0 and later.
C# | Visual Basic | Visual C++ |
public enum NSDocumentChangeType
Public Enumeration NSDocumentChangeType
public enum class NSDocumentChangeType
Member | Description |
---|---|
NSChangeDone | Increment change count. The value to pass to updateChangeCount: to indicate that a single change has been done. For example, the built-in undo support of NSDocument passes this value whenever a document receives an NSUndoManagerWillCloseUndoGroupNotification from its own undo manager. Available in Mac OS X v10.0 and later. |
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. Available in Mac OS X v10.0 and later. |
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. Available in Mac OS X v10.0 and later. |
NSChangeReadOtherContents | The document has been initialized with the contents of a file or file package other than the one whose location would be returned by fileURL, 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. Available in Mac OS X v10.4 and later. |
NSChangeAutosaved | The document's contents have been autosaved. For example, saveToURL:ofType:forSaveOperation:error: passes this value for a successful NSAutosaveOperation. Available in Mac OS X v10.4 and later. |
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. Available in Mac OS X v10.5 and later. |
- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)