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

CaptainZap

macrumors regular
Original poster
Jan 17, 2007
170
0
I'm creating a new application, and in this application there is a class called Student which has an array as an instance variable. And I'm going to use an Array controller to add and remove them and display them using a table view. Like this...
Screenie -
picture3dx2.png


If you are still confused -
Say I have an array that has {Bob, Susie, Bill} in it, and I want them to be displayed in the table view horizontally like
| Col 1 | Col 2 | Col 3
| Bob | Susie | Bill

And I can't figure out what Model Key Path I need to return the object in the array at the index of the row. Help? =]


Edit:

Alright, I know how to do it with identifiers and without key paths but that takes a lot of code and I still want to figure out how to do it with Key Paths =D
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
I'm not sure if you can do this with bindings since each row is represented as an object within an array, and each column is a property of that object. You could definitely do it without bindings, and yes it would take a lot of code, but not that much :)
 

CaptainZap

macrumors regular
Original poster
Jan 17, 2007
170
0
Yah, I ended up just using identifiers and it works fine, just might not be the best solution. And it only took 6 lines of code for the whole thing.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.