Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

klaxamazoo

macrumors 6502
Original poster
Sep 8, 2006
438
0
I've been having trouble and haven't managed to find a clear solution from documentation.

I have an NSDictionary object called "allValuesDictionary" that contains a bunch of arrays. Is it possible to use bindings to populate an NSTableview?

I've looked into NSDictionaryController and NSArrayController but I think I'm doing something wrong when I try and bind the controller to the tablecolumns.
 
Can you describe your data a little more? Is it something like:
{keyOne => [valOne,valTwo,valThree]
keyTwo => [valFour,valFive,valSix]}

With keyOne and keyTwo as your column headers, with three rows of data?

If so, this is opposite of what I'm used to seeing:
[
{keyOne => valOne, keyTwo => valFour},
{keyOne => valTwo, keyTwo => valFive},
{keyOne => valThree , keyTwo => valSix}
]

({} contains dictionary pairs, [] contain arrays.

I'm honestly not sure about bindings, but array of hash/dictionary is much more common.

-Lee
 
I was trying to do the first method:

{keyOne => [valOne,valTwo,valThree]
keyTwo => [valFour,valFive,valSix]}

where each key was tied to an NSArray and I wanted to populate the table with the arrays.

I'll look into the hash dictionary.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.