What solved the problem finally was checking "Handles Content as Compound Value" in the content binding preferences of the ArrayController.
NSArrayController changes doesn't propagate to binded NSUserDefaults
-
06-08-2022 - |
Question
I have a master-detail GUI layout:
NSTableView
with content bound to anNSArrayController
.- The
NSArrayController
data is bound toNSUserDefaults
rows. - An
NSTextField
with value bound to theNSArrayController
'sselection
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
.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow