NSTableView Protocol Help!
NSTableView Protocol Help!
- Subject: NSTableView Protocol Help!
- From: Eric Lee <email@hidden>
- Date: Thu, 4 Sep 2008 18:10:00 -0500
So, I've written a practice application with NSTableView, and
NSMutableArray. I have NSTableView connected to AppController as a
dataSource, and I connected all outlets.
I have ALREADY defined the protocols needed, but for some reason, this
message keeps on appearing in the debugger:
*** Illegal NSTableView data source (<MyDocument: 0x167290>). Must
implement numberOfRowsInTableView: and
tableView:objectValueForTableColumn:row:
Here are the protocols that I have written:
___________________________________________________
- (void)tableView:(NSTableView *)anotherTableView
setObjectValue:(id)anObject
forTableColumn:(NSTableColumn *)anotherTableColumn
row:(NSInteger)rowIndex
{
[mutableArray replaceObjectAtIndex:rowIndex withObject:anObject];
}
- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(NSInteger)rowIndex
{
return [mutableArray objectAtIndex:rowIndex];
}
- (NSInteger)numberOfRowsInTableView:aTableView
{
return [splitViewMutableArray count];
}
___________________________________________________
Thanks for any help!!
_______________________________________________
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