• 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
Re: How subclass NSTreeController's -(void)insertChild:? [fixed]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How subclass NSTreeController's -(void)insertChild:? [fixed]


  • Subject: Re: How subclass NSTreeController's -(void)insertChild:? [fixed]
  • From: Thilo Ettelt <email@hidden>
  • Date: Thu, 18 May 2006 16:37:23 +0200

D'uh. I've found out myself.

Subclassing this method doesn't help. But there is another way, catching:

- (void)insertObject:(id)obj in<keyPath>AtIndex:(unsigned int)index

and inserting a different object into the Array. There's still there same error message, but the object appears in the outline view.

Hope I can help anyone who might run into the same problem. Sometimes bindings are just evil. I can't wait for Leopard, I hope that the bindings work better then.


- Thilo

Am 18.05.2006 um 16:23 schrieb Thilo Ettelt:

Hello list,

I want to add a child to my NSTreeController. The child needs to have an object passed through its initializer (i.e. - initWithObject:). So I thought I would subclass -(void)insertObject and manually put the object in the array to which the controller is bound. This however gives me a strange message:

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


How can I call my inizializer and add a child anyway now?


Thx in advance, 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

_______________________________________________ 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
References: 
 >How subclass NSTreeController's -(void)insertChild:? (From: Thilo Ettelt <email@hidden>)

  • Prev by Date: How subclass NSTreeController's -(void)insertChild:?
  • Next by Date: Re: Variable scope/lifetime of class methods (concerns Threads)
  • Previous by thread: How subclass NSTreeController's -(void)insertChild:?
  • Next by thread: How do I find out if a process is running if I have the process Name?
  • Index(es):
    • Date
    • Thread