• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to hook up controllers to a hand generated OM?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How to hook up controllers to a hand generated OM?
      • From: mmalcolm crawford <email@hidden>
References: 
 >How to hook up controllers to a hand generated OM? (From: Joseph Jones <email@hidden>)

  • Prev by Date: Re: Core Data, Bindings, and default relationships
  • Next by Date: Window not autosaving to User Defaults
  • Previous by thread: How to hook up controllers to a hand generated OM?
  • Next by thread: Re: How to hook up controllers to a hand generated OM?
  • Index(es):
    • Date
    • Thread