Pregunta

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

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top