Re: help with methods
Re: help with methods
- Subject: Re: help with methods
- From: Quincey Morris <email@hidden>
- Date: Thu, 29 Jul 2010 15:03:21 -0700
On Jul 28, 2010, at 21:26, Rounak Jain wrote:
> But I don't understand what
>
> [toDoList objectAtIndex:rowIndex];
>
> means.
Now would be a good time to go back to Apple's documentation, which is written to answer exactly the kinds of questions you're asking. You should start with:
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/TableView/TableView.html
In particular, the answers to your current questions are in this section:
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/TableView/Tasks/UsingTableDataSource.html
Once you have that under your belt, then you should also browse through the reference documentation:
http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSTableDataSource_Protocol/Reference/Reference.html
http://developer.apple.com/mac/library/documentation/Cocoa/Reference/NSTableViewDelegate_Protocol/Reference/Reference.html
to see what else these protocols contain.
Both data source and delegate follow Cocoa's common "delegation" pattern. There are 2 protocols because they historically represent a division of labor -- data source to supply the data and delegate to control the behavior and appearance of the table. I don't think there's much importance to be attached to the division any more. Together they represent a set of delegation methods, some required, most optional, which are useful for controlling the table.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden