I am unable to set an attribute on an object like this:
NSLog(@"setting: %f", tempVal);
self.device.mainProperty.wanted = [NSNumber numberWithFloat:tempVal];
NSLog(@"set: %f", self.device.mainProperty.wanted.floatValue);
This gives me the following output:
2015-07-28 17:18:24.775 App[5488:1480266] setting: 4.500000
2015-07-28 17:18:24.775 App[5488:1480266] set: 4.000000
I am getting completely frustrated at this, it makes no sense to me. But perhaps someone can help me. Thanks
EDIT: I use this code for something where it only uses an integer. Then it works just fine.
So, me being a derp at the end of a long work day. I forgot the NSNumber 'wanted' was a Integer from a Core Data store. And apparently when you set the float for that attribute it will automatically convert it to an integer, even though I didn't save it to the datastore or anything. After a heavyweight data migration all was good. The more you know