Questions tagged [nsundomanager]

`NSUndoManager` is a general-purpose recorder of operations for undo and redo.

222 questions
0
votes
1 answer

Core Data saving child context in performBlock: removes undo stack

I'm making a drawing app. With each tap some core data entities are created. The user can hit the undo button and those clicks are undone one at a time. This works fine. The problem comes when some automated task is run. I have a button that creates…
Odrakir
  • 4,254
  • 1
  • 20
  • 52
0
votes
1 answer

core data undo specific record

I have records that are added, updated. Then sync them with server. According to server response, if one of them fail to update, I would like to have that NSManagedObject to previous value. As I research, UndoManager works as stack, so I can't find…
tugce
  • 651
  • 3
  • 13
  • 28
0
votes
1 answer

NSUndoManager does not seem to post NSManagedObjectContextDidSaveNotification on undo or redo

My app performs certain actions in a method attached to the NSManagedObjectContextDidSaveNotification notification (which is being executed on save). It also uses an NSUndoManager which is undoing/redoing happily. I had expected the 'did save'…
Jaysen Marais
  • 3,956
  • 28
  • 44
0
votes
1 answer

Link NSDocument's changeCount to NSTextView

Is there a way to somehow link an NSDocument's changeCount to the only NSTextView that is used for a document? Or so I have to implement all the necessary NSTextViewDelegate methods and update the changeCount myself?
Jawap
  • 2,463
  • 3
  • 28
  • 46
0
votes
1 answer

Is it possible to use NSUndoManager without Core Data?

I created an App without Core Data. The App has a lots of functions such as manipulating views with gestures, colors and texts. What I want to do is using the undo and redo functions. I read everything about Core Data and NSUndoManager and I have…
Studie
  • 799
  • 2
  • 12
  • 20
0
votes
1 answer

NSUndoManager is in invalid state

Working through the book Cocoa Programming for Mac OS X (third edition) from Aaron Hillegass I am now at Chapter 9, at the end of section Adding Undo to RaiseMan. Hillegass tells you to add two methods to your class MyDocument and then build the app…
11684
  • 7,356
  • 12
  • 48
  • 71
0
votes
2 answers

NSUndoManager calls my "restore" method repeatedly

I have a UITextView with a formatting toolbar. After I press the "bold" button, it changes the text/selection and registers the operation with the text view's NSUndoManager. When you try to undo, restoreText: is called over and over until you kill…
Jorge Bernal
  • 265
  • 3
  • 11
0
votes
1 answer

ios Undo manager - reset to first undo

I am developing an IOS app. I need a functionality that includes undo and reset. It seems quite simple to perform an undo on the last operation. However I can't find any built in support for resting to the first stored undo operation. My question…
vondip
  • 13,809
  • 27
  • 100
  • 156
0
votes
2 answers

undo all changes made in a view controller

Is it possible to undo all changes made in a view controller without affecting the changes made in its parent view controller? btw. They are with the same managedObjectContext. ps. I have two entities A and B. A has an to-many relationships to B.…
lu yuan
  • 7,207
  • 9
  • 44
  • 78
0
votes
2 answers

Undo an IBAction?

I am trying to press a UIBarButtonItem and perform an action, which it does. When It does I'm changing the name of the title of the BarButtonItem. That way if I hit it again I want to Undo the action it performed rather than coding everything out to…
Jason
  • 650
  • 2
  • 10
  • 33
-1
votes
1 answer

How to add Undo for NSBezierPath with NSUndoManager on Mac OS X with Swift 4?

I'm trying to add Undo function for NSBezierPath. This function draws circle with NSBezierPath with radius 45. with mouseLocation as center of the circle Then it draws the NSBezierPath on CAShapeLayer and add to the NSViewController's view. How…
-1
votes
1 answer

NSUndoManager stops undoing in certain conditions

Im trying to implement an undo manager in my app using Core Data. Instead of making my own UndoManager im using the default undo manager in my ManagedObjectContext. Because of that i am not registering any actions manually, neither am i beginning or…
RAV
  • 11
  • 2
1 2 3
14
15