Skip navigation.
 
mlNSUndoManager invalid state
FROM : Lorenzo
DATE : Fri Jan 04 06:34:31 2008

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_removed>

Related mailsAuthorDate
No related mails found.