• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSUserDefaults and binding to an NSDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUserDefaults and binding to an NSDictionary


  • Subject: Re: NSUserDefaults and binding to an NSDictionary
  • From: Matt Neuburg <email@hidden>
  • Date: Mon, 16 Oct 2006 12:02:24 -0700
  • Thread-topic: NSUserDefaults and binding to an NSDictionary

On Mon, 16 Oct 2006 14:23:24 +0200, Daniel Tapie <email@hidden>
said:
>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.

Aside from the question of how you are naming your keys, the big trick here
is to pass thru a controller where Handles Content as Compound Value is
checked. m.

--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>



 _______________________________________________
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

  • Follow-Ups:
    • Re: NSUserDefaults and binding to an NSDictionary
      • From: Daniel Tapie <email@hidden>
  • Prev by Date: Re: get iTunes songs
  • Next by Date: Re: NSUserDefaults and binding to an NSDictionary
  • Previous by thread: NSUserDefaults and binding to an NSDictionary
  • Next by thread: Re: NSUserDefaults and binding to an NSDictionary
  • Index(es):
    • Date
    • Thread