On Apr 24, 2016, at 13:43 , Raimond Hettrich <sa...@onlinehome.de> 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:

        
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/TableView/PopulatingViewTablesWithBindings/PopulatingView-TablesWithBindings.html

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      (Xcode-users@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to