Re: NSTableView
Re: NSTableView
- Subject: Re: NSTableView
- From: Brian Stern <email@hidden>
- Date: Fri, 23 May 2008 16:20:42 -0400
On May 23, 2008, at 4:03 PM, john darnell wrote:
The code meant to be used in response for the requirement in the
Companion article to return the value of a given cell in the table
looks
like this:
- (id) directoryTable: (NSTableView *) aTableView
objectValueForTableColumn:(NSTableColumn *) aTableColumn row: (int)
rowIndex
Your method name is wrong. The name of the datasource method must be:
tableView:objectValueForTableColumn:row:
This is documented in the NSTableDataSource Protocol Reference and the
Table View Programming Guide.
{
NSLog(@"Row index is %d", rowIndex);
NSString *file = [arrayOfFiles objectAtIndex:rowIndex];
return [file self];
}
Your line return [file self] is odd. Just: return file;
--
Brian Stern
email@hidden
_______________________________________________
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
References: | |
| >NSTableView (From: "john darnell" <email@hidden>) |