Re: Bindings for dictionaries inside of an array
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