I have a dictionary object that I am pulling data out of. The field is supposed to be a string field but sometime all that it contains is a number. I get the info using:
NSString *post = [[temp objectAtIndex:i] valueForKey:@"POSTDESCRIPTION"];
So it is going into a string object. However, when I try to assign that to a cell's text via:
cell.textLabel.text = post;
I get a the following error:
'NSInvalidArgumentException', reason: '*** -[NSDecimalNumber isEqualToString:]: unrecognized selector sent to instance 0x4106a80'
2009-10-20 13:33:46.563
I have tried casting it with the following ways to no avail:
NSString *post = [[[temp objectAtIndex:i] valueForKey:@"POSTDESCRIPTION"] stringValue];
NSString *post = (NSString *)[[temp objectAtIndex:i] valueForKey:@"POSTDESCRIPTION"];
cell.textLabel.text = [post stringValue];
cell.textLabel.text = (NSSting *)post;
What am I doing wrong?