views:

132

answers:

1

In a test iPhone app I am developing, I am trying to set the value of a float field in my Core Data model. The compiler is giving me an incompatible type error even though both the data type specified in my method is a float and the data type in model is a float.

This is the first project where I am using Core Data instead of SQLite 3.

- (void)insertNewObject:(NSString *)titleTxt withAmount:(float)amount andDueDate:(NSDate *)due {
[newManagedObject setValue:amount forKey:@"amountDue"];
+2  A: 

You'll have to make an NSNumber with the float.

Ken Aspeslagh
I thought it'd be something of that nature. Thanks for the quick response.
Cirrostratus