Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NSArrayController + View based NSTableView binding to NSTextField

I have a view based NSTableView. An array controller.

Set content of tableview to array controller's arrangedObjects. Set content of array controller to a NSMutableArray of a custom object.

Binding table cell view's NSTextField's value to the array controller with Controller key: arrangedObjects and Model key path: name

When program is running, the number of rows is correct, the contents in the arranged objects is correct but the textfield's string doesn't change? Tried binding the textfield and the and textfield cell.

Here is a sample: someone please tell me what I'm doing wrong. https://dl.dropboxusercontent.com/u/29574/random/nsarraycontroller%20viewbased%20tableview.zip

like image 576
ssj Avatar asked Nov 03 '13 20:11

ssj


1 Answers

Following are the steps:

  1. Bind your array to array controller
  2. Select table view, go to Table Content widget and bind to ArrayController's arrangedObjects
  3. Select table view cell, go to value widget and bind to "Table Cell View" with the key path,whatever you have taken

Now Your table view will populate

like image 170
PR Singh Avatar answered Oct 21 '22 13:10

PR Singh