• 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: Core Data / Bindings question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data / Bindings question


  • Subject: Re: Core Data / Bindings question
  • From: Chris Hanson <email@hidden>
  • Date: Tue, 26 Jun 2007 14:55:52 -0700

On Jun 26, 2007, at 1:54 PM, Phil wrote:

I'm trying to create a binding to an entity so that I can observe any additions to the entity in question but am not clear on how to accomplish this.

What do you mean by "create a binding to an entity"? When working with Core Data, it's critical to use the terminology correctly.


Do you want to use an array controller bound to all instances of an entity? Or do you want to see property changes in your interface for a particular instance of an entity?

Also, binding in code ("manually") won't be very different than binding in Interface Builder, and it won't be very different for Core Data versus non-Core Data. You'll just be sending - bind:toObject:withKeyPath:options: to the view or controller that you want bound, passing the controller or model object (respectively) that you want your view or controller bound to.

The main difference between bindings when using Core Data and when not using it is that when using Core Data, your controllers should generally be in entity mode with an entity specified, and should have their managed object context either bound or set appropriately.

If you want to see some examples, just option-drag an entity definition out of the Xcode modeling tools into a new empty window in Interface Builder, and inspect the various bindings that are created there. The automatic interface generation mechanism isn't doing anything you can't do yourself in Interface Builder, and Interface Builder in turn isn't doing anything you can't do in code.

  -- Chris

_______________________________________________

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


  • Follow-Ups:
    • Re: Core Data / Bindings question
      • From: Phil <email@hidden>
References: 
 >Core Data / Bindings question (From: Phil <email@hidden>)

  • Prev by Date: Re: Core Data / Bindings question
  • Next by Date: Re: Another Core Data Ivar Setter and Undo Issue
  • Previous by thread: Re: Core Data / Bindings question
  • Next by thread: Re: Core Data / Bindings question
  • Index(es):
    • Date
    • Thread