• 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: Bindings for dictionaries inside of an array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bindings for dictionaries inside of an array


  • Subject: Re: Bindings for dictionaries inside of an array
  • From: Lance Braud <email@hidden>
  • Date: Thu, 30 Jul 2009 16:21:25 -0700


I thought that the keys in your objects are these:

These are the "keys" in a dictionary. I want to display the whole dictionary in a two column table.


bounds,
contents,

Using "key" works when it is a dictionary by itself

Show us what you mean by that.

I create a KV-compliant NSDictionary in my AppController named "oneNote." In IB, I drag out a Dictionary Controller and bind it to oneNote. I create a 2-column table, then bind the first column of the table to the Dictionary Controller's "arrangedObjects" with a "Model Key Path" of "key". I bind the second table column with a "Model Key Path" of "value". This works perfectly, listing the dictionary's keys in the first column and their values in the second column.


I have tried various combinations of "skimNote.key", "skimNote.contents", and "contents" in the Array Controller's "Model Key Path", without success.

I have now tried binding the Dictionary Controller to the Array controller, with a "Controller Key" of "selection" and "Model Key Path" of "skimNotes". This doesn't throw any exceptions at runtime, but the tables are blank.

So, for an array, which contains dictionary elements, how do I refer to the dictionary in IB's bindings?

Lance


_______________________________________________

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


References: 
 >Bindings for dictionaries inside of an array (From: Lance Braud <email@hidden>)
 >Re: Bindings for dictionaries inside of an array (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: NSString and regular expressions
  • Next by Date: Re: NSString and regular expressions
  • Previous by thread: Re: Bindings for dictionaries inside of an array
  • Next by thread: How to tell other controller that orientationDidChange
  • Index(es):
    • Date
    • Thread