Re: Core Data with Xcode 7.3
Re: Core Data with Xcode 7.3
- Subject: Re: Core Data with Xcode 7.3
- From: Quincey Morris <email@hidden>
- Date: Sun, 24 Apr 2016 14:12:30 -0700
- Feedback-id: 167118m:167118agrif8a:167118s3XCd8o7kP:SMTPCORP
On Apr 24, 2016, at 13:43 , Raimond Hettrich <email@hidden> wrote:
Now I chose the Table View Cell to bind to the Array Controller which is bound to my core data. So in the Binding Inspector I chose Value an then Bind to "Array Controller". As controller key I chose „selection“ and for the Model Key Path I wanted to use the attribute of my core data entity „title“. But the autocomplete of Xcode doesn’t show „title“.
No. this is not the correct thing to do. This situation is described here:
Assuming you’re using a view-based NSTableView (the default, these days), the table cell (in IB, the object that’s *immediately below* each column in the view hierarchy) is automatically assigned an object as its “objectValue” property. When your table view is bound to an array controller, as you’ve done, you don’t need to do anything extra to make this work.
Instead, you must only bind the subviews of the table cell — unfortunately IB also calls these “table cell” by default when they’re text fields, but they’re 2 or more levels below the column object in the hierarchy — to an objectValue property. In this case, since you’ve set things up so that the objectValue is going to be an Event object, you’ll bind table cell subviews to model key “objectValue.title” and “objectValue.subtitle”, leaving the controller key empty. These should the only per-cell bindings you need.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden