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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to