NSUndoManager invalid state
NSUndoManager invalid state
- Subject: NSUndoManager invalid state
- From: Lorenzo <email@hidden>
- Date: Fri, 04 Jan 2008 06:34:31 +0100
Hi,
I get the message
1/4/08 6:14:13 AM TestUndoApp[1489] undo: NSUndoManager 0x142c1820 is in
invalid state, undo was called with too many nested undo groups
I get this error only when I return newChild in the function here below.
If I return nil, or any other value, the undo works well. Why?
- (id)AddItem:(NSDictionary*)itemDict
{
// I add here the item
id newChild = [treeNode AddItemWithDict:itemDict];
[[gKMUndoManager prepareWithInvocationTarget:self] DeleteItem:newChild];
[gKMUndoManager setActionName:@"Add Item"];
return newChild;
// if I return nil or itemDict or any other id, the undo works well.
}
I have read here some post about the same trouble, but cannot find the
solution. Any pointer?
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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