O'Reilly logo

Cocoa Programming for OS X: The Big Nerd Ranch Guide by Aaron Hillegass, Adam Preble, Nate Chandler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Binding the Text Fields to the Table Cell Views

Just like with a data source, when a table view’s Content is bound, each row in the table view maps to an object in that array. Each cell in the row, an instance of NSTableCellView, has its objectValue set to that object. Controls within those cells, such as text fields, will typically display the value of a property on that object. In RaiseMan, the objectValue of each cell will be the Employee object for that row.

Therefore, you need to bind the text fields in RaiseMan’s columns to the cell views’ objectValue. You will follow a similar approach to the one you used when configuring the binding in SpeakLine.

The employee’s name will be displayed in the first column’s cell. To set this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required