Re: Managed Object with Getter

2010-01-13 Thread Jim Correia
On Jan 13, 2010, at 7:29 PM, Richard Somers wrote: > On Jan 13, 2010, at 7:14 AM, Jim Correia wrote: > >> This style is typically used for non-object BOOL values. If you use it for >> an NSNumber attribute, you run the risk of someone familiar with the pattern >> assuming it is a BOOL property

Re: Managed Object with Getter

2010-01-13 Thread Richard Somers
On Jan 13, 2010, at 7:14 AM, Jim Correia wrote: This style is typically used for non-object BOOL values. If you use it for an NSNumber attribute, you run the risk of someone familiar with the pattern assuming it is a BOOL property and writing if ([managedObject isSelected]) {

Re: Managed Object with Getter

2010-01-13 Thread Jim Correia
On Jan 13, 2010, at 8:39 AM, Richard Somers wrote: > On Jan 13, 2010, at 1:17 AM, Kyle Sluder wrote: > >> This code cannot generate that error because it doesn't send any >> messages. You need to post the code to which the error actually >> refers. > > This works. > > @property (nonatomic,

Re: Managed Object with Getter

2010-01-13 Thread Richard Somers
On Jan 13, 2010, at 1:17 AM, Kyle Sluder wrote: This code cannot generate that error because it doesn't send any messages. You need to post the code to which the error actually refers. This works. @property (nonatomic, retain) NSNumber *selected; if ([[self selected] boolValue]) {

Re: Managed Object with Getter

2010-01-13 Thread Kyle Sluder
On Tue, Jan 12, 2010 at 6:53 PM, Richard Somers wrote: > A property declaration attribute with the getter shown below does not work > for a NSManagedObject subclass. > >     @property (nonatomic, retain, getter=isSelected) NSNumber *selected; > > It produces error "unrecognized selector sent to in

Managed Object with Getter

2010-01-12 Thread Richard Somers
A property declaration attribute with the getter shown below does not work for a NSManagedObject subclass. @property (nonatomic, retain, getter=isSelected) NSNumber *selected; It produces error "unrecognized selector sent to instance". What did I do wrong? --Richard