CoreData NSTreeController and NSOutline View
CoreData NSTreeController and NSOutline View
- Subject: CoreData NSTreeController and NSOutline View
- From: Justin Bakse <email@hidden>
- Date: Fri, 9 Jun 2006 15:24:27 -0400
Hello,
I am working on a small project to familiarize myself with core data.
It is a simple time tracker with entities for individual work
sessions grouped into projects grouped into clients.
I have set up a working three level master detail interface similar
to itunes... clients (Artists) on the left, then invoices (albums) in
the middle and work sessions (songs) underneath.
That works well and was really easy, and almost code free to set up.
Now I'd like to see if i can move the clients and invoices into a
NSOutline view, with clients holding their invoices under a
disclosure triangle. I can get it to partially work but i run into
problems with things not being the way the TreeController expects,
that i can smooth over by adding dummy relationships and such to a
certain point. For instance clients have a relationship to invoices,
but invoices do not have a relationship to themselves (the tree
should not be allowed to go deeper than one level from the top).
Another main problem is that the work sessions use the invoices array
controller to define the content set. With the array controller
replaced by the tree controller, the content set gets confused if the
user selects a client in the outline view. It seem like as i smooth
over an issue like this (by adding a relationship from invoices to
itself) it creates new problems. I'm thinking that i'm just going
against the grain, not using the NSTreeController how it was intended.
So, I'm wondering, is it generally strange to have a tree controller
deal with multiple kinds of entities?
Is there a better approach I should be looking at, perhaps
subclassing the NSTreeController?
Any general thoughts?
And while I'm at it... I've done the coredata tutorial on
cocoadevcentral.com, and apple's video tutorial. Both were excellent.
I'm also referencing apples coredata docs. Can anyone recommend some
material that has some higher level tutorial/cook book style content
on core data?
_______________________________________________
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