• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSUndoManager invalid state
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: View controllers (was Re: Garbage collection, leaks and drains)
  • Next by Date: Window close button issue in Leopard
  • Previous by thread: Re: Questions about enhancing the Learn Cocoa II app.
  • Next by thread: Window close button issue in Leopard
  • Index(es):
    • Date
    • Thread