Instance Method

setActionIsDiscardable(_:)

Sets whether the next undo or redo action is discardable.

Declaration

func setActionIsDiscardable(_ discardable: Bool)

Parameters

discardable

Specifies if the action is discardable. true if the next undo or redo action can be discarded; false otherwise.

Discussion

Specifies that the latest undo action may be safely discarded when a document can not be saved for any reason.

An example might be an undo action that changes the viewable area of a document.

To find out if an undo group contains only discardable actions, look for the NSUndoManagerGroupIsDiscardableKey in the userInfo dictionary of the NSUndoManagerWillCloseUndoGroup.

See Also

Discardable Undo and Redo Actions

var undoActionIsDiscardable: Bool

Boolean value that indicates whether the next undo action is discardable.

var redoActionIsDiscardable: Bool

Boolean value that indicates whether the next redo action is discardable.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software