FROM : Lee Morgan
DATE : Sat Apr 09 23:26:09 2005
How about simply
NSString *myString = [aNumber stringValue];
So...
NSLog([aNumber stringValue]);
Also the two following are very handy at times...
NSLog(@"%@", aNumber); // Log any cocoa object
NSLog([aNumber description]); // Log a string description of any cooca
object
- lee
On Apr 9, 2005, at 5:21 PM, Jerry Brace wrote:
> Is there a way to convert a NSNumber value to a NSString?
>
> I'm trying to do a NSLog on a numeric value - I am assuming my error
> is that the value is numeric and I would need to convert it to a
> string.
>
>
> Jerry Brace
> Web and Multimedia Developer
> <email_removed>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/
> <email_removed>
>
> This email sent to <email_removed>
>
DATE : Sat Apr 09 23:26:09 2005
How about simply
NSString *myString = [aNumber stringValue];
So...
NSLog([aNumber stringValue]);
Also the two following are very handy at times...
NSLog(@"%@", aNumber); // Log any cocoa object
NSLog([aNumber description]); // Log a string description of any cooca
object
- lee
On Apr 9, 2005, at 5:21 PM, Jerry Brace wrote:
> Is there a way to convert a NSNumber value to a NSString?
>
> I'm trying to do a NSLog on a numeric value - I am assuming my error
> is that the value is numeric and I would need to convert it to a
> string.
>
>
> Jerry Brace
> Web and Multimedia Developer
> <email_removed>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<email_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/
> <email_removed>
>
> This email sent to <email_removed>
>
| Related mails | Author | Date |
|---|---|---|
| Jerry Brace | Apr 9, 23:21 | |
| Lee Morgan | Apr 9, 23:26 | |
| Mike Ferris | Apr 11, 16:35 |






Cocoa mail archive

