Re: Using bindings to lessen amount of code
Re: Using bindings to lessen amount of code
- Subject: Re: Using bindings to lessen amount of code
- From: email@hidden
- Date: Tue, 14 Dec 2010 23:23:02 -0500
On Dec 13, 2010, at 12:25 PM, Paul Johnson wrote:
> I want to obtain the value at a particular row and column in a table.
>
>
> I implemented the datasource protocol method
> tableView:objectValueForTableVColumn:row:
>
>
> In this method I return [[self.arrangedObjects valueForKey:@"symbol"]
> objectAtIndex:rowIndex].
>
>
> Is there a way to solely use bindings to accomplish this and not implement
> the datasource protocol method at all?
Yes. You create an NSArrayController and then bind each table column. See the appropriate examples here:
http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
HTH,
Dave
_______________________________________________
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