CoreData + NSTreeController + NSOutlineView help with basics
CoreData + NSTreeController + NSOutlineView help with basics
- Subject: CoreData + NSTreeController + NSOutlineView help with basics
- From: Dan Donaldson <email@hidden>
- Date: Sat, 28 Jan 2006 20:52:36 -0500
I need help understanding the use of CoreData & bindings and their
use with NSTreeController and an NSOutlineView.
The desired output is an outline with root-level headings with the
title of conferences. The children would be short extracts from
papers from those conferences with a title. The title would act as a
parent to the extract in the outline. In the model I am using, there
is an entity Conference, whose relevant attribute is a string, Title.
It is related to a Papers entity, whose relevant attribute is a
string Extract.
v Herpetological Society, 1856
v Snakes in Iceland
There are no snakes to be met with in the island
> The St Patrick Effect: an environmental study
> Ornithological Proceedings of the Royal Society, 1857
Here are points of confusion:
- how should the relations work? I have what is obvious, a many-to-
one inverse relationship
Papers <<-------------------> Conference
attribute:Extract attribute:Name
attribute: Title
but given the hierarchical relationship, should I be establishing a
Parent relationship at the entity level? What use are Parent
relationships in the datamodelling screen?
- Does the hierarchical display in the outline of the the Title and
Extract suggest a self-relation in the Papers entity? How does this
get bound?
- I'm sorry, I don't understand the options in the bindings section
of the inspector when using NSTreeController. I should mention that
for now, I am happy to do this via the binding palette; if it has to
be programmatically that's OK, but then, what's the palette for?
- The closest tutorial I've found has been the DragAndDropOutlineEdit
project at
http://homepage.mac.com/matthol2/iblog/C857616487/E198776286/Media/
DragAndDropOutlineEdit.zip
which is on a related subject but more complex than my immediate
needs. I've studied the project but have not been able to understand
it adequately well. I've also looked at the Apple docs relating to
the NSTreeController, and tried to understand the CoreRecipe sample
project, but this seems to be broken in the critical area for my
version of XCode (2.2). The difficulty with the Apple docs is the
lack of context, since what I'm trying to do is the specific
combination of three or four parts (CoreData, Controllers,
NSOutlineView, Bindings) I've also gone through the BlogDemo example
from
http://www.cocoadevcentral.com/articles/000085.php
without problems.
I could and have dealt with this sort of thing using conventional
XCode approaches, but I'd prefer to use the CoreData approach as a
proof of concept.
Dan Donaldson
_______________________________________________
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