Re: Request for help in getting table View to reflect fetch results
Re: Request for help in getting table View to reflect fetch results
- Subject: Re: Request for help in getting table View to reflect fetch results
- From: "Ernest Schaal" <email@hidden>
- Date: Mon, 16 Jul 2007 06:11:12 +0900
Thank you for the information, and the link.
You all have given me a lot to study over the next few days. If I
understand you correctly, it is doable, but it is a nontrivial
exercise.
It appears that the present Mac documentation makes it easy for the
novice to get started in developing a data base, and you can easily
make a quick-and-dirty one on the fly, but such a database lacks many
features (like fetch requests that modify the table view). To do more,
you really have to know the code well enough to make you own
controllers from scratch rather than use the ones made by the
control-drag from the model to the interface window.
(Notice that when I talk of the control-drag from the model to the
interface window, I am not talking about the drag and drop methods for
the table view)
The TableViewDataSource.m mentions two references that I will be studying.
- NSTableDataSource Protocol Objective-C Reference
- Table View Programming Guide
On 7/16/07, mmalc crawford <email@hidden> wrote:
On Jul 14, 2007, at 10:57 PM, Chris Hanson wrote:
> So the question should really be "How can I connect my table view
> through some sort of controller to my model objects?"
>
> There are a couple of ways you can do this, both fairly
> straightforward. You can bind the NSValueBinding of each of your
> table columns through an NSArrayController to the appropriate model
> objects, by binding the array controller's NSContentArrayBinding to
> a collection of model objects.
> Or you can implement your own controller that conforms to the
> NSTableDataSource informal protocol, point it at a collection of
> model objects, and make it your table view's dataSource.
>
For a comparison of these approaches, see:
<http://developer.apple.com/samplecode/WithAndWithoutBindings/index.html
>
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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