NSTreeController and Core Data.
NSTreeController and Core Data.
- Subject: NSTreeController and Core Data.
- From: Óscar Morales Vivó <email@hidden>
- Date: Mon, 4 Jul 2005 00:42:20 -0400
I'm trying to create a small sample application which would have a
single entity with a name attribute and a one to many relationship to
itself (a parent->children kind of relationship, to-one on the
inverse) and to display it using a NSOutlineView.
I understand that to filter the roots for the outline view I just
need to filter the controller to parent == nil.
However I'm not sure whether I can somehow use the controller's
addChild/InsertChild (now, what was the difference between them?)
methods to populate the database, or whether I need to subclass the
NSTreeController to override those methods and configure the new
objects properly. There doesn't seem to be any way to tell the
controller to set the relationships when creating new child objects,
but I've seen the frameworks do similar insights before.
I should add that so far I've found the documentation about
NSTreeController woefully inadequate (don't worry I don't hold it to
anyone ;o). Some sample code and some extra info other than the class
documentation would help lots there. If I've missed something please
point it my way.
Thanks in advance for any help:
Oscar Morales Vivo.
_______________________________________________
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