Hi all,

I am getting a very confusing error when I try to send a -stringValue message 
to an NSNumber object.  Here is my code:

NSNumber * primaryLanguageNumber = [self primaryLanguageID];
NSString * primaryLanguageString = [primaryLanguageNumber stringValue];

primaryLanguageID is of type NSNumber.  When I am stepping through the debugger 
I can see the variable primaryLanguageNumber being set correctly.  However, 
once I try to call stringValue on it I get the following error:

2009-12-06 16:51:24.525 Averroes[21013:a0f] -[NSCFString stringValue]: 
unrecognized selector sent to instance 0x1001d8a70

Doesn't that mean that it thinks primaryLanguageNumber is a string?  And why 
would it see it as a string?

Thanks for your help!
Mazen Abdel-Rahman
_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to