Re: [REPOST] Removing particular undo/redo actions with Core Data
Re: [REPOST] Removing particular undo/redo actions with Core Data
- Subject: Re: [REPOST] Removing particular undo/redo actions with Core Data
- From: Jim Correia <email@hidden>
- Date: Tue, 6 Feb 2007 21:22:28 -0500
I know that you can temporarily disable undo action registration, but
what I want to do in this case is get rid of *all* past undo actions
for the object, but only that particular object and not everything
else. NSUndoManager's removeAllActionsWithTarget: is pretty much
exactly what I want, but calling that with the managed object in
question as the argument does not seem to remove any undo actions,
presumably because Core Data handles the undo registrations in a less
straight-forward manner than just registering them for the managed
object itself.
The state of the entire object graph is important, not just one object.
Is there any way to accomplish what I want to do, or am I just going
to have to settle for clearing the entire undo stack for now and file
an enhancement request for later?
Even if CoreData exposed enough API to allow you to do this, issues
remain.
- As Murat suggested, how to you present this to the user in a way
that doesn't feel like the app is boken?
- In anything but the trivial case of adjusting attributes on a
single object, removing single undo states from the undo stack is
likely to put the object graph into an invalid state when the undo
stack is unwound. In general, this is a complex problem.
Can you resolve the problem by prevent undo registration to begin
with? Or clearing the entire undo stack?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden