Re: cannot be sent to an abstract object of class

2010-12-04 Thread Sherm Pendley
On Sat, Dec 4, 2010 at 6:56 PM, Stephen J. Butler wrote: > On Sat, Dec 4, 2010 at 5:17 PM, Shane > wrote: >> @interface >> { >>        NSNumber *rate; >>        // ... >> } >> // ... >> #end >> >> - (id) init >> { >>        // … >>        rate = [[NSNumber alloc] initWithFloat:0.0]; >>        //

Re: cannot be sent to an abstract object of class

2010-12-04 Thread Dave DeLong
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 NSBig

Re: cannot be sent to an abstract object of class

2010-12-04 Thread Stephen J. Butler
On Sat, Dec 4, 2010 at 5:17 PM, Shane wrote: > @interface > { >        NSNumber *rate; >        // ... > } > // ... > #end > > - (id) init > { >        // … >        rate = [[NSNumber alloc] initWithFloat:0.0]; >        // now has retain count of 1 > } > > - (void) myMethod > { >        // ... >  

Re: cannot be sent to an abstract object of class

2010-12-04 Thread Dave DeLong
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 mu