Re: cannot be sent to an abstract object of class
Re: cannot be sent to an abstract object of class
- Subject: Re: cannot be sent to an abstract object of class
- From: Dave DeLong <email@hidden>
- Date: Sat, 04 Dec 2010 15:59:15 -0800
Ignore me. I didn't get much sleep last night. Stephen apparently did. :)
Dave
On Dec 4, 2010, at 3:52 PM, Dave DeLong wrote:
> NSNumber, like pretty much all "core" types in Foundation, is an abstract class. You never have an NSNumber. You usually have an NSCFNumber, sometimes an NSBigMutableNumber, etc. (You also never have an NSArray, but usually an NSCFArray, etc)
>
> As such, if you wanted a retained NSNumber, you must do:
>
> rate = [[NSNumber numberWithFloat:0.0] retain];
>
> To actually allocate an NSNumber instance is (as you have found out) incorrect.
>
> Cheers,
>
> Dave
_______________________________________________
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