ChristianKienle/OSXBoilerplate

objectValue.title

Closed this issue · 1 comments

First, let me say that I love this project and find it very useful. I hope this can grow into a full featured set of boilerplate code for OSX applications.

This is not really an issue, but I wanted to get some help. I am trying to extend the functionality of the demo by adding an NSCollectionView to the right hand side of the window. I see that you bind objectValue.title to the static text field of the TableViewCell. I assume this title value comes from the CoreData store that is managed by the Array Controller.

I have tried to add an NSCollectionView to the right hand side of the Split View, bind the Content and Selection Indexes of the Array Controller to the Collection View, then create a Collection View Item that can also display the title. I add a static text field to the Collection View Item's view. and bind objectValue.title to the text field, but the app instantly crashes. How do I access objectValue from a Collection View?

Hi,

you have to bind the text field as follows:

Bind to: Collection View Item
Controller Key: none
Model Key Path: representedObject.title

I have created a modified version of the boiler plate project that does what you want. You can find it here:

http://dl.dropbox.com/u/29925418/github/ChristianKienle-OSXBoilerplate-95bc3b6.zip

Christian