• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: TableView displaying a zillion empty rows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >TableView displaying a zillion empty rows (From: Brian Hughes <email@hidden>)
 >Re: TableView displaying a zillion empty rows (From: Florian Soenens <email@hidden>)
 >Re: TableView displaying a zillion empty rows (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: TableView displaying a zillion empty rows
  • Next by Date: The code limit to the media type to .mp3 and .aiff
  • Previous by thread: Re: TableView displaying a zillion empty rows
  • Next by thread: Re: TableView displaying a zillion empty rows
  • Index(es):
    • Date
    • Thread