Data sources and NSTableView

Posted by lampShade on Stack Overflow See other posts from Stack Overflow or by lampShade
Published on 2010-04-21T23:24:10Z Indexed on 2010/04/21 23:33 UTC
Read the original article Hit count: 277

Filed under:
|
|

I know that table sources need a data source to hold the data that the tableview will display. Lets' say that I'm going to make my AppController be the data source of my tableview and that I make the connection in interface builder. My question is since my actual data is going to be stored in an array,let's call it myArray, when I set the data source in code should I do this

 [tableView setDataSource:myArray]; or this [tableView setDataSource:self];

I'm confused about this. setting the data source with the keyword "self" would set it to the AppController if I'm not mistaken.

© Stack Overflow or respective owner

Related posts about beginner

Related posts about cocoa