• 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
-objectIn<key>AtIndex not called?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-objectIn<key>AtIndex not called?


  • Subject: -objectIn<key>AtIndex not called?
  • From: Thilo Ettelt <email@hidden>
  • Date: Thu, 23 Mar 2006 12:12:49 +0100

Hi,

when I use the TreeController's -addChild and manually put more than one item into the children's mutable array using - (void) insertObject: in<key>AtIndex: and remove multiple items using - (void) removeObjectFrom<key>AtIndex: and then use -addChild I noticed - objectIn<key>AtIndex will not be called again and the TreeController uses cached objects instead of the newly created. How can I fix this?

When I add the 2nd object it gives me:

"unexpected state: trying to insert object <NSKVONotifying_Mitarbeiter: 0x352310> failed. Destination node == nil or destination node did not retain the object"

And when I remove the second object:

"unexpected state, deleted index != 0"

I've also tried to tell the TreeController by using:

[self willChange:NSKeyValueChangeRemoval/Inseration/Removal valuesAtIndexes:[NSIndexSet indexSetWithIndex:appropriateIndex] forKey:@"children"];

But that did not help. Or did I use it wrong?


Please help!


- Thilo _______________________________________________ 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
  • Prev by Date: Sending mail
  • Next by Date: Re: Sending mail
  • Previous by thread: Re: Sending mail
  • Next by thread: NSImages are killing my WindowServer
  • Index(es):
    • Date
    • Thread