`NSUndoManager` is a general-purpose recorder of operations for undo and redo.
Questions tagged [nsundomanager]
222 questions
2
votes
0 answers
Manage Undo across multiple NSTextFields in the same window
While Undo for multiple NSTextViews in a window work persistently, the same is not the case for NSTextField controls by default.
I like to make Undo behave the same for NSTextField as it works with NSTextView.
I have so far found out that…

Thomas Tempelmann
- 11,045
- 8
- 74
- 149
2
votes
1 answer
Core Data and undo groups
I'm working with Core Data for the first time and this has me stumped.
I have the following methods to handle grouping my changes and saving them:
- (void)beginUndoGrouping:(NSManagedObjectContext *)managedObjectContext {
NSLog(@"begin");
…

janineanne
- 585
- 7
- 17
2
votes
2 answers
Cancelling edits: NSUndoManager or separate NSManagedObjectContext for editing?
I have a View Controller that manages a view which is always shown in editing mode. The view is essentially a table view similar to that of a contact's details in Apple's Contacts app. The model underneath my view is represented by a 2-level object…

octy
- 6,525
- 1
- 28
- 38
2
votes
0 answers
Synchronize two different UndoManager
I'm using Core Data Undo Manager and view custom Undo Manager.
A Core Data with BackgroundTask.
My project's core data stack is almost same with apple documents…

최연석
- 367
- 1
- 2
- 15
2
votes
1 answer
Registering a redo operation from an async undo with NSUndoManager
With UndoManager.registerUndo(withTarget:selector:object:) I can register an undo operation, and in the provided selector calling this same method again causes the registration of a redo operation. This works fine unless in the selector I'm calling…

Nickkk
- 2,261
- 1
- 25
- 34
2
votes
0 answers
NSUndoManager custom coalescing changes to NSTextField results in crash
I have a basic Cocoa app using NSUndoManager to support undo/redo. My data model's title can be updated by editing an NSTextField. Out of the box NSTextField supports coalescing changes into a single "Undo Typing" undo action so that when the user…

Mark
- 6,647
- 1
- 45
- 88
2
votes
0 answers
Three-finger undo gesture with custom undo manger
I'm trying to handle the three-finger gesture with a custom undo manager. Using the default undo manager provided by the window, resolved via the UIResponder chain works flawlessly. As soon as I try to use an own undo manager in a view controller I…

Paul Schröder
- 1,440
- 1
- 10
- 19
2
votes
2 answers
Clearing NSUndoManager's Redo stack
In my application, there are some actions I want to undo programmatically, without giving the user the option of clicking "Redo". Is there any way to clear the Redo stack of NSUndoManager? If not, and I were to subclass NSUndoManager, is there any…

Dov
- 15,530
- 13
- 76
- 177
2
votes
0 answers
Can I remove the undoManager of UISearchBar?
I was wondering if I can remove the undoManager of UISearchbar, because I don't plan to make use of it. Or is there any way for me to disable or hide it?
Thanks.

purplelilgirl
- 25
- 1
- 9
2
votes
1 answer
NSImageView and NSUndoManager
I have a image on the view and user can drag and move the image or rotate the image with finger touch.
I want to do Undo the action performed by user.
Like if the image is move to new location and then user press undo button, image should move back…

user501565
- 21
- 2
2
votes
1 answer
Unit Test with NSUndoManager, Runloop - Obj-C
I'm trying to test some code with an undo manager, but apparently, undo's get grouped when run in the same run loop. I have tried turning off groupsByEvent, but it doesn't work as expected.
- (NSString *)article
{
return _article == nil ? @"no…

Chris
- 2,739
- 4
- 29
- 57
2
votes
2 answers
Implementing redo alongside undo with UndoManager in drawing application Swift 3
I am working on a project that includes an annotation tool allowing users to "draw" on documents with finger gestures or a pencil. Naturally, I'm keen on implementing undo/redo for drawn paths.
My implementation for the drawing app is relatively…

Marcus
- 2,153
- 2
- 13
- 21
2
votes
0 answers
Nested undo with NSUndoManager and Core Data
I have a little problem with NSUndoManager.
When the user is about to edit some entity A, I stick everything into an undo grouping so that the changes can easily be undone. So far so good.
However, while the user is editing entity A, he can also add…

Christoph
- 1,580
- 5
- 17
- 29
2
votes
1 answer
How can I undo a NSManagedObject deletion without using the built-in undo manager?
I'm building an OSX document-based app using CoreData and NSUndoManager.
I have a global NSUndoManager that handles the Undoing and Redoing, instead of using the default one that's built into each NSManagedDocument. This means that I register the…

Chase Finch
- 5,161
- 1
- 21
- 20
2
votes
1 answer
Can't successfully register undo from NSTextField
I have a simple document-based application that simply creates a custom XML file. It uses an Outline View to navigate the XML document. When an item in the Outline View is selected a custom view is displayed as a sub view of the document view that…

Rob
- 4,149
- 5
- 34
- 48