Question

I have a master-detail GUI layout:

  1. NSTableView with content bound to an NSArrayController.
  2. The NSArrayController data is bound to NSUserDefaults rows.
  3. An NSTextField with value bound to the NSArrayController's selection property.

The table is populated with data from the storage as it should, and selecting a row changes the textField value.

Editing the textfield changes the corresponding table row as it should, but it does not change the NSUserDefaults!

If I relaunch the app, the changes are not saved. BTW, if I add/remove rows from the table - it is persisted, but changes to row data are not.

It seems like the changes in the NSArrayController selection dictionary are not propagated to NSUserDefaults.

Was it helpful?

Solution

What solved the problem finally was checking "Handles Content as Compound Value" in the content binding preferences of the ArrayController.

Screenshot:enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top