Re: NSTableView DataSource Problem
Re: NSTableView DataSource Problem
- Subject: Re: NSTableView DataSource Problem
- From: Cemil Browne <email@hidden>
- Date: Fri, 20 Jun 2008 12:16:50 +1000
Alex,
I believe your problem may lie in:
-(id) table: (NSTableView*)tv
objectValueForTableColumn:(NSTableColumn*)tableColumn
row:(int) row
is not an implementation of tableView:objectValueForTableColumn:row: -
note you name it "table" rather than "tableView"
I could be wrong, however...
Cemil
On 20/06/2008, at 12:13 PM, Alex Wait wrote:
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
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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