Difference between these 2 methods


#1

can someone please tell me the difference between this method

-(id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row{

and this method

I’ve read the developers library and i don’t seems to see any difference between this 2 methods


#2

Hello chanyeechoong, I am also learning objective-C and glad I can (hopefully) give you an answer :slight_smile:

I don’t remember the specifics of this chapter, but at least I can tell you the differences between these 2 methods: the first one is a method that - when sent to a tableView - will return you an object, whereas the second one will allow you to provide the tableView with an object.

Hope this can help you understand… If not please let me know exactly what gives you trouble to understand.
Cheers,
Remi


#3

Do you mean the first method is to get the object from the array and the 2nd method is to display the object in the view.


#4

Yes, eventually that’s exactly it!