Re: How subclass NSTreeController's -(void)insertChild:? [fixed]
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