Thanks for the quick response. Works like a charm!


On Nov 28, 2009, at 6:26 AM, Andrew Farmer wrote:

> On 28 Nov 2009, at 03:20, Philip Vallone wrote:
>> I want to cast a NSNumber to int. When I execute the below code, my result 
>> should be 1, not 68213232. What am I doing wrong?
> 
> You are trying to cast a pointer to an integer and expecting meaningful 
> results. Don't.
> 
> If you want to get the numeric value of a NSNumber object, use its intValue 
> (or floatValue, longValue, etc.) method.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to