NSTableView DataSource Problem
NSTableView DataSource Problem
- Subject: NSTableView DataSource Problem
- From: "Alex Wait" <email@hidden>
- Date: Thu, 19 Jun 2008 19:13:18 -0700
First time doing this on my own.
I have the classic AppController class. I set the datasource and the
delegate to be AppController for my dataSource. I have a NSTableView* to the
table
that I also set in Interface Builder.
I have the methods below. listOfItems is a NSMutableArray with some NSString
objects in it.
I get the warning:
2008-06-19 19:12:55.889 OwnDataSource[96942:10b] *** Illegal NSTableView
data source (<AppController: 0x137b00>). Must implement
numberOfRowsInTableView: and tableView:objectValueForTableColumn:row:
But I clearly have those. What have I done wrong?
Thanks for any help,
Alex
-(int) numberOfRowsInTableView:(NSTableView*) thetable
{
return [listOfItems count];
}
-(id) table: (NSTableView*)tv
objectValueForTableColumn:(NSTableColumn*)tableColumn
row:(int) row
{
return [listOfItems objectAtIndex:row];
}
_______________________________________________
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