Bindings: NSArrayController <> Shared User Defaults - more detailed
Bindings: NSArrayController <> Shared User Defaults - more detailed
- Subject: Bindings: NSArrayController <> Shared User Defaults - more detailed
- From: Dominik Pich <email@hidden>
- Date: Tue, 1 Jan 2008 13:25:45 +0100
Hi,
as the title states I have a Problem with binding my ArrayController
to the Shared User Defaults...
I have for example this array:
<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>
--- Here's what I do:
-the above array I read from plist
- I use it as initial value for the NSUserDefault as a key: "items"
- I then bind an NSArrayController to the shared defaults controller
using contentArray=values.items as the binding.
-To that Controller I bind the columns of a tableView.
using value=arrangedObjects.name as the Binding for the 1. Column
using value=arrangedObjects.enabled as the Binding for the 2. Column
(using a PopupButtonCell)
--- all working great so far ^^
-> I can SEE the array I bound to just fine
---But now comes the Problem:
-> I want to be able to modify my array ... I dont want to add or
remove objects BUT modify individual items' values. Especially I want
to toggle their enabled states.
The changes I make in my tableView though (via the popupButtons) are
not 'reqistered' by the defaults. I never get a notification something
changed, nor does the defaults save the modified array.
Why is that? It seems to me that the new array is somehow considered
to be identical to the old?
Regards,
Dominik
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden