I get an error in my console:
2009-05-30 20: 17: 05.801 ChuckFacts [1029: 20b] *** - [Joke isEqualToString:]: unrecognized selector sent to instance 0x52e2f0
Here is my code, which I believe comes from:
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Joke";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
[[NSBundle mainBundle] loadNibNamed:@"TableCell" owner:self options:nil];
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero
reuseIdentifier:CellIdentifier] autorelease];
cell = tableCell;
}
NSString *jokeText = [jokes objectAtIndex:indexPath.row];
UILabel *jokeTextLabel = (UILabel*) [cell viewWithTag:1];
jokeTextLabel.text = jokeText;
NSString *dateText = formattedDateString;
UILabel *dateTextLabel = (UILabel*) [cell viewWithTag:2];
dateTextLabel.text = dateText;
[self todaysDate];
return cell;
}
"jokes" is an array full of jokes if you need to know
Why does this error occur?
You also see the part of the error that says:
sent to instance 0x52e2f0
How can I determine what "0x52e2f0" is, so it would be easier to find the problem next time?
user100051
source
share