Re: NSTreeController - setEntityName only settable once??
Re: NSTreeController - setEntityName only settable once??
- Subject: Re: NSTreeController - setEntityName only settable once??
- From: mmalcolm crawford <email@hidden>
- Date: Mon, 30 Jan 2006 01:38:48 -0800
On Jan 29, 2006, at 4:12 PM, Andre wrote:
- (IBAction)addAttribute:(id)sender
{
id newAttribute = [[self managedObjectContext]
insertNewEntityWithName:@"Attribute"];
[self insertObject:newAttribute atArrangedObjectIndexPath:[self
selectionIndexPath]];
}
This just adds peers...
That's because you're telling it to add a peer.
The only problem now, is, how to add children....
<http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/ObjC_classic/Classes/NSTreeController.html#//apple_ref/
occ/instm/NSTreeController/addChild:>
Or if you need something more sophisticated, follow the pattern Scott
suggested and implement your desired behaviour in code (create a new
instance of the necessary entity and add it to the appropriate
relationship of the currently-selected object).
mmalc
_______________________________________________
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