Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTreeControll and different entities



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.