I have a core data entity with a property amount, which is a NSDecimalNumber
. For this property the entity's class has a method defined with an NSDecimalNumber
as argument.
In Interface Builder I bound a table column to this property (using an NSArrayController
) and on the column's cell I put an NSNumberFormatter
. The formatter is configured in IB as 'currency'.
Now, when I try to enter a number, I get the following error:
-[NSCFNumber decimalNumberBySubtracting:]: unrecognized selector sent to instance 0x1001d5590
Apparently my setter method is receiving a regular NSNumber
rather than an NSDecimalNumber
. Can I configure my formatter differently, perhaps in code rather than IB, or is the only option to add an additional setter with an NSNumber
as argument?