I am trying to set a Core Data attribute but am getting incompatible type errors. I have a float attribute in a Core Data entity on iPhone 3.0. Core Data auto-generates an interface for a managed data object that provides property access to it:
@property (nonatomic, retain) NSNumber * volume;
and an implementation for it:
@dynamic volume;
I create an instance of the managed data object, which I call attrVolume, and use that to access that Core data entity attribute through a Core Data managed object context:
[attrVolume setVolume:[txtVolume.text floatValue]];
The compilation error is:
incompatible type for argument 1 of 'setVolume:'
Any ideas how to cast that value and not get that compilation error? Is there a way to cast to NSNUmber?
Any help appreciated // :)