Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSUndoManagerMBS class.

NSUndoManagerMBS.beginUndoGrouping

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Marks the beginning of an undo group.

All individual undo operations before a subsequent endUndoGrouping message are grouped together and reversed by a later undo message. By default undo groups are begun automatically at the start of the event loop, but you can begin your own undo groups with this method, and nest them within other groups.

NSUndoManagerMBS.canRedo as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a Boolean value that indicates whether the receiver has any actions to redo.

NSUndoManagerMBS.canUndo as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a Boolean value that indicates whether the receiver has any actions to undo.

The return value does not mean you can safely invoke undo or undoNestedGroup—you may have to close open undo groups first.

NSUndoManagerMBS.Constructor   Private

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 13.1 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The private constructor.

NSUndoManagerMBS.disableUndoRegistration

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Disables the recording of undo operations.

This method can be invoked multiple times by multiple clients. The enableUndoRegistration method must be invoked an equal number of times to re-enable undo registration.

NSUndoManagerMBS.enableUndoRegistration

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Enables the recording of undo operations.

Because undo registration is enabled by default, it is often used to balance a prior disableUndoRegistration message. Undo registration isn't actually re-enabled until an enable message balances the last disable message in effect. Raises an NSInternalInconsistencyException if invoked while no disableUndoRegistration message is in effect.

NSUndoManagerMBS.endUndoGrouping

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Marks the end of an undo group.

All individual undo operations back to the matching beginUndoGrouping message are grouped together and reversed by a later undo or undoNestedGroup message. Undo groups can be nested, thus providing functionality similar to nested transactions. Raises an NSInternalInconsistencyException if there's no beginUndoGrouping message in effect.

NSUndoManagerMBS.groupingLevel as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the number of nested undo groups (or redo groups, if Redo was invoked last) in the current event loop.

An integer indicating the number of nested groups. If 0 is returned, there is no open undo or redo group.

NSUndoManagerMBS.groupsByEvent as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a Boolean value that indicates whether the receiver automatically creates undo groups around each pass of the run loop.

True if the receiver automatically creates undo groups around each pass of the run loop, otherwise false.
(Read and Write computed property)

NSUndoManagerMBS.isRedoing as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a Boolean value that indicates whether the receiver is in the process of performing its redo method.

True if the method is being performed, otherwise false.

NSUndoManagerMBS.isUndoing as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a Boolean value that indicates whether the receiver is in the process of performing its undo or undoNestedGroup method.

True if the method is being performed, otherwise false.

NSUndoManagerMBS.isUndoRegistrationEnabled as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a Boolean value that indicates whether the recording of undo operations is enabled.

True if registration is enabled; otherwise, false.
Undo registration is enabled by default.

NSUndoManagerMBS.levelsOfUndo as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the maximum number of top-level undo groups the receiver holds.

An integer specifying the number of undo groups. A limit of 0 indicates no limit, so old undo groups are never dropped.

When ending an undo group results in the number of groups exceeding this limit, the oldest groups are dropped from the stack. The default is 0.
(Read and Write computed property)

NSUndoManagerMBS.redo

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Performs the operations in the last group on the redo stack, if there are any, recording them on the undo stack as a single group.

Raises an NSInternalInconsistencyException if the method is invoked during an undo operation.

NSUndoManagerMBS.redoActionName as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the name identifying the redo action.

The redo action name. Returns an empty string if no action name has been assigned or if there is nothing to redo.

For example, if the menu title is "Redo Delete," the string returned is "Delete."

NSUndoManagerMBS.redoMenuItemTitle as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the complete title of the Redo menu command, for example, "Redo Paste."

Returns "Redo" if no action name has been assigned or an empty string if there is nothing to redo.

NSUndoManagerMBS.redoMenuTitleForUndoActionName(actionName as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the complete, localized title of the Redo menu command for the action identified by the given name.

Override this method if you want to customize the localization behavior. This method is invoked by redoMenuItemTitle.

Available in Mac OS X v10.0 and later.

NSUndoManagerMBS.removeAllActions

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Clears the undo and redo stacks and re-enables the receiver.

NSUndoManagerMBS.setActionName(actionName as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the name of the action associated with the Undo or Redo command.

If actionName is an empty string, the action name currently associated with the menu command is removed. There is no effect if actionName is "".

NSUndoManagerMBS.undo

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Closes the top-level undo group if necessary and invokes undoNestedGroup.

This method also invokes endUndoGrouping if the nesting level is 1. Raises an NSInternalInconsistencyException if more than one undo group is open (that is, if the last group isn't at the top level).

NSUndoManagerMBS.undoActionName as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the name identifying the undo action.

The undo action name. Returns an empty string if no action name has been assigned or if there is nothing to undo.

For example, if the menu title is "Undo Delete," the string returned is "Delete."

NSUndoManagerMBS.undoMenuItemTitle as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the complete title of the Undo menu command, for example, "Undo Paste."

Returns "Undo" if no action name has been assigned or "" if there is nothing to undo.

NSUndoManagerMBS.undoMenuTitleForUndoActionName(actionName as string) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the complete, localized title of the Undo menu command for the action identified by the given name.

Override this method if you want to customize the localization behavior. This method is invoked by undoMenuItemTitle.

NSUndoManagerMBS.undoNestedGroup

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Performs the undo operations in the last undo group (whether top-level or nested), recording the operations on the redo stack as a single group.

Raises an NSInternalInconsistencyException if any undo operations have been registered since the last enableUndoRegistration message.

The items on this page are in the following plugins: MBS MacBase Plugin.


The biggest plugin in space...