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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacBase Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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 |
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 "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 |
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 |
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 |
If actionName is an empty string, the action name currently associated with the menu command is removed. There is no effect if actionName is "".
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacBase Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
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 |
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 "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 |
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 |
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.