Re: How to hook up controllers to a hand generated OM?
Re: How to hook up controllers to a hand generated OM?
- Subject: Re: How to hook up controllers to a hand generated OM?
- From: Chris Hanson <email@hidden>
- Date: Mon, 20 Jun 2005 23:30:57 -0700
On Jun 20, 2005, at 11:13 PM, Joseph Jones wrote:
I am generating a Core Data model by hand and instantiating
entities in the OM based on information in a loaded file. I can't
use IB to create controllers/bindings since the OM is not known
before hand. I have the OM generated and the Graph filled out. What
I need now is a way to hook up controllers to the graph so that I
can bind my UI to the controllers and leverage all the great work
there.
You can just invoke -bind:toObject:withKeyPath:options: on the
controllers and views you want to bind, and set up bindings
programmatically between your views and your object model. See the
documentation for the NSKeyValueBindingCreation informal protocol in
AppKit for details.
You'll also need to set up your controllers to know about your
managed object context, to know which entity they're controller (and
that they're controlling entities and not classes), and so on. Also
be sure to configure the contentSet binding for any array controller
that will be managing a relationship. See the NSController,
NSObjectController, and NSArrayController documentation for details.
-- Chris
_______________________________________________
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