Reputation:
I have this code:
- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row
{
if ([[tableColumn identifier] isEqualToString:@"friend name"]) {
if (row == 0) {
return @"All friends";
} else {
return [[friendsArray objectAtIndex:row - 1] name];
}
}
return nil;
}
And I get this warning, although the program runs as expected:
conflicting types for '-(id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(int)row'
How can I get rid of this warning? Thanks.
Answers related to UITableViews
instead of NSTableViews
will be down voted.
Upvotes: 1
Views: 1449
Reputation: 299355
In 10.5, the definition of this was changed to:
- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row;
Note the use of NSInteger
versus int
.
Upvotes: 3