Re: TableView displaying a zillion empty rows
Re: TableView displaying a zillion empty rows
- Subject: Re: TableView displaying a zillion empty rows
- From: Quincey Morris <email@hidden>
- Date: Wed, 8 Jul 2009 00:53:36 -0700
On Jul 8, 2009, at 00:31, Andy Lee wrote:
//returnValue = [player valueForKey: [aTableColumn identifier]];
if ([[aTableColumn identifier] isEqualTo: @"firstName_"] == YES)
returnValue = [player firstName_];
else if ([[aTableColumn identifier] isEqualTo: @"lastName_"])
returnValue = [player lastName_];
else if ([[aTableColumn identifier] isEqualTo: @"playerName_"])
returnValue = [player playerName_];
else if ([[aTableColumn identifier] isEqualTo:
@"trebleClefGameLevel_"])
returnValue = [NSNumber numberWithInt: [player
trebleClefGameLevel_]];
else if ([[aTableColumn identifier] isEqualTo:
@"altoClefGameLevel_"])
returnValue = [NSNumber numberWithInt: [player
altoClefGameLevel_]];
else if ([[aTableColumn identifier] isEqualTo:
@"tenorClefGameLevel_"])
returnValue = [NSNumber numberWithInt: [player
tenorClefGameLevel_]];
else if ([[aTableColumn identifier] isEqualTo:
@"bassClefGameLevel_"])
returnValue = [NSNumber numberWithInt: [player
bassClefGameLevel_]];
else if ([[aTableColumn identifier] isEqualTo:
@"symbolTextConcentrationGameLevel_"])
returnValue = [NSNumber numberWithInt: [player
symbolTextConcentrationGameLevel_]];
Incidentally, like in the other delegate method, an "else {...handle
the error...}" would be a useful addition on the end of this. Without
it, it's exactly equivalent to the commented-out valueForKey version.
Also, 'isEqualTo:' is the wrong method to use. It should be
'isEqualToString:' or possibly 'isEqual:'.
_______________________________________________
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