I have a master-detail GUI layout:
NSTableView
with content bound to an NSArrayController
.NSArrayController
data is bound to NSUserDefaults
rows.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
.
What solved the problem finally was checking "Handles Content as Compound Value" in the content binding preferences of the ArrayController.