Re: TableView displaying a zillion empty rows
Re: TableView displaying a zillion empty rows
- Subject: Re: TableView displaying a zillion empty rows
- From: Mac First <email@hidden>
- Date: Wed, 8 Jul 2009 09:25:17 -0700
On Jul 8, 2009, at 12:31 AM, Andy Lee wrote:
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_]];
Missing lines:
else
NSAssert1(@"Unknown tablecolumn ID: %@",
[aTableColumn identifier]);
If you're getting "a zillion empty rows", I'll bet you a dollar it's
because your program SAYS TO DISPLAY a zillion empty rows. One way to
do that is to "return returnvalue" when returnvalue is nil.
Try poking around the rest of your code for potential invalid
assumptions, too. Assert is your friend!
--
A Mac person says "I want complete control."
A Unix person says "no you don't."
_______________________________________________
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