NSUserDefaults and binding to an NSDictionary
NSUserDefaults and binding to an NSDictionary
- Subject: NSUserDefaults and binding to an NSDictionary
- From: Daniel Tapie <email@hidden>
- Date: Mon, 16 Oct 2006 14:23:24 +0200
Hi there,
I have a simple question regarding bindings and user defaults and I
could not find an answer in any of the mailing lists (it is probably
very obvious).
My user defaults contain a few booleans, strings and numbers all of
which work fine when bound to various text fields and checkboxes.
So, my question is: how do I bind values that are included in an
NSDictionary which itself is one of my user defaults?
Here is the typical structure of my user defaults:
--> Key: @"Preference 1", Value (NSString): @"any string"
--> Key: @"Preference 2", Value (NSNumber): 1234
--> Key: @"Sub Preferences", Value (NSDictionary):
--> Key: @"Sub Preference 1", Value (NSString): @"any string"
--> Key: @"Sub Preference 2", Value (NSNumber): 4567
So, I tried binding a text field to "Sub Preferences.Sub Preference
1" but all it does is create a "Sub Preferences.Sub Preference 1"
string and not a dictionary containing the string.
Has anybody done that already?
Thanks!
Daniel Tapie,
Brussels, Belgium
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden