Skip navigation.
 
mlBindings: NSArrayController <> Shared User Defaults
FROM : Dominik Pich
DATE : Mon Dec 31 11:42:28 2007

Hi,
as the title states I have a Problem with binding my ArrayController 
to the Shared User Defaults... changes to items in the array dont get 
flushed back

I have an array in a plist in my bundle:
<items>
   <dict>
       <key>name</key>
       <string>bla1</string>
       <key>enabled</key>
       <true/>
   </dict>
   <dict>
       <key>name</key>
       <string>bla22222</string>
       <key>enabled</key>
       <true/>
   </dict>
   <dict>
       <key>name</key>
       <string>bla33</string>
       <key>enabled</key>
       <true/>
   </dict>
</items>

this array I read from plist, I use with registerDefaults as a key: 
"items"

I then bind an NSArrayController to the shared defaults controller 
using values.items as the binding. To that Controller I bind a 
tableView. 1. Column :: name, 2. Column: enabled (using a 
PopupButtonCell)

I CANNOT add or remove items from the array -- dont want
I want to be able to toggle the enabled state of items

--- all working great so far ^^

But now comes the Problem: Changes are never ..... committed back to 
the defaults.
Why is that? It seems to me that the new array is somehow considered 
to be identical to the old?

Regards,
Dominik

Related mailsAuthorDate
mlBindings: NSArrayController <> Shared User Defaults Dominik Pich Dec 31, 11:42
mlRe: Bindings: NSArrayController <> Shared User Defaults Jerry Krinock Dec 31, 15:44
mlBindings: NSArrayController <> Shared User Defaults - more detailed Dominik Pich Jan 1, 13:25