tags:

views:

22

answers:

1

I have custom NSObject with an NSNumber property. I'm trying to set and recall this property in a view controller that includes the custom object's header. However, the view controller doesn't recognize the property as "something in a structure or union". I've treated this NSNumber property exactly like an NSString property in the same custom object. I don't get these sorts of errors with the string.

Here's the custom object's header:

@interface IndividualsTab : NSObject {
    NSMutableArray *itemList;
    NSString *personsName;
    NSNumber *customTip;
}

@property (nonatomic, retain) NSMutableArray *itemList;  
@property (nonatomic, retain) NSString *personsName;
@property (nonatomic, retain) NSNumber *customTip;

Here's a sample of usage in the view controller:

IndividualsTab *thisTab = [self.listOfPeople objectAtIndex:(tipBeingEdited - 20)];
thisTab.customTip = tipRate;

That last line gives me an error. However, a similar call for thisTab.personsName works properly. I was sure to put a default value for both properties in the custom class's init code.

Any ideas?

A: 

Have you remembered to @synthesize your properties?

Bjarne Mogstad
Yes I have. Right after the @implementation.
Cyg