Re: How to use NSUndoManager removeAllActionsForTarget:?
Re: How to use NSUndoManager removeAllActionsForTarget:?
- Subject: Re: How to use NSUndoManager removeAllActionsForTarget:?
- From: Brian Webster <email@hidden>
- Date: Mon, 15 Apr 2002 19:16:44 -0500
On Monday, April 15, 2002, at 05:59 PM, cocoa-dev-
email@hidden wrote:
Is removeAllActionsWithTarget: failing to remove the group
delimiters when
it should? Is this a bug, or am I responsible for getting rid
of them (and
if so, how?)?
I'd qualify this as a bug, at least to a certain extent. The
way I see it, whenever you remove actions from the undo stack,
any grouping from which an action is removed should also be
removed, since invoking that group of actions could potentially
lead to an inconsistent state. Furthermore, any group below
such a group in the stack should also be removed, since there's
even more chance to arrive at an inconsistent state if these
actions are invoked.
So, I think removeAllActionsWithTarget: really should do this
stack cleaning for you, since there's no API to do it yourself,
or there should at least be a method that you can call to set
this behavior. For now, the two choices seem to be to wipe out
the whole stack when an object goes away, or just live with an
undo that does nothing. Or of course, you could always do a
little hacking to clean it up yourself, but this probably
wouldn't be much fun.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.