Undo group action name lost in drag operation
Undo group action name lost in drag operation
- Subject: Undo group action name lost in drag operation
- From: Gabriele de Simone <email@hidden>
- Date: Tue, 5 Oct 2004 09:33:25 -0400
Hi everyone,
In response to a copy-on-drop operation in a NSTableView, I add a
number of elements to my model. To my great pleasure I noticed that
whatever Cocoa class was processing the drag operation for me was
automatically beginning and ending an undo group around my handler
(tableView:acceptDrop:row:dropOperation:).
Enlightened by this discovery, I set an action name at the end of my
insertions ("Add Items"), and sure enough this action name shows up
under the Edit menu as "Undo Add Items". The problems begin when you
undo that operation. The action name is lost, and the Redo menu item
name takes the name of the last nested action of the undo group.
Now, I did find the following workaround, which basically tells my
model objects *not* to set the action name if an undo group is open...
if ([undoManager groupingLevel == 0) {
[undoManager setActionName:@"something"];
}
...but I am interested in knowing whether I am ignoring some basic
knowledge on undo grouping action names. A search for "undo group
action name lost" brought up nothing on CocoaBuilder.
Thanks,
Gabriele
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden