Re: unrecognized selector error when calling -stringValue on NSNumber
Re: unrecognized selector error when calling -stringValue on NSNumber
- Subject: Re: unrecognized selector error when calling -stringValue on NSNumber
- From: Dave Carrigan <email@hidden>
- Date: Sun, 6 Dec 2009 16:08:20 -0800
On Dec 6, 2009, at 3:58 PM, Mazen M. Abdel-Rahman wrote:
>
> 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:
We would need to see the source code for -primaryLanguageID
It's most likely returning a NSString, not a NSNumber.
--
Dave Carrigan
email@hidden
Seattle, WA, USA
_______________________________________________
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