multiple columns table

…so: I’ve got a 2 columns table. Each one of them is binded to an array controller. Each array controller is binded to its own property in the delegate. Both properties are arrays having the same length.

Now: it seems I can get it to work only when I bind one column at a time. If I try to bind both, I got an empty table. I suspect this happens because the table expects columns to be filled at the same time, but in the code I can only set one property at a time…

What’s happening exactly?

Thank you all

You only need one array controller for however many columns a table contains.

Yes, I finally managed to make it work in the exact same moment I received your answer. I was thinking about it and I thought “…when I bind an array I don’t set the Model Key Path, so… maybe I can create an array… made of arrays, where each one of these sub-arrays has as many items as the number of the columns of the table, and probably I should set a name for each one of them… each name will be a key path for the array controller…”

…and in fact it works… Great!

Thank you

Normally, a two column table would be populated by an array of dictionaries with each column bound to one of the keys in the dictionary. You wouldn’t necessarily have to have both keys in the dictionary from the start. If you don’t have the data for the second key until after the program is running, you can just add it with setValue_forKey_.

Ric