NSTreeControll and different entities
NSTreeControll and different entities
- Subject: NSTreeControll and different entities
- From: rakel <email@hidden>
- Date: Thu, 28 Dec 2006 19:50:51 +0100
Hi all,
I'm trying to create a little program where I have two different
entities, let's call them Type and Item. Several items can have the
same type. Type and Item instances are created dynamically in a
"setup" part of the program. Type could be anything, e.g. "Operating
Systems" with Items "Mac OS X", "Mac OS 9", "Linux" etc. Another
Type, in the same setup could (theoretically anyway) be "Fruits",
with the Items "Banana", "Orange", etc.
I will also have "score" for each Item, but not for the Type. So the
Type and Item entities are not at all the same kind of object. The
Type is a container and the Item is a thing you place in the
container. I really, really like CoreDate and would very much like to
use that for this model.
In another part of the program, I would like to present (but not
edit) this setup, preferrably in a tree view of some sort -- why not
an NSOutlineView -- like so
| Operating Systems
| --- Mac OS X
| --- Mac OS 9
| --- Linux
| Fruits
| --- Banana
| --- Orange
Now, to my question: can I use bindings via NSTreeController? If so,
how do I set up the controller?
Or must I write my own datasource for the outline view?
Regards
/Dan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden