[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problems with NSDoubleNumber
From: |
David Wetzel |
Subject: |
problems with NSDoubleNumber |
Date: |
Sat, 12 Jun 2010 02:07:36 -0700 |
Hi,
this code has been working before and is working on OS, but this is current
(svn) -base:
// string is @"6.69"
price = (NSDecimalNumber*) [NSDecimalNumber numberWithDouble:[myString
doubleValue]];
price = (NSDecimalNumber*) [price decimalNumberByDividingBy:[NSDecimalNumber
numberWithInt:100]];
(<NSException: 0x7f7ff88e3e60> NAME:NSInvalidArgumentException
REASON:NSDoubleNumber(instance) does not recognize decimalNumberByDividingBy:
INFO:(nil))
(gdb) po self
6.69
(gdb) po [self class]
NSDoubleNumber
---------------------------------------
If I would use decimalNumberWithString:locale: what is the currently best way
to do this with a '.' separator?
This is a web app so the user settings might become irrelevant.
Thanks!
David Wetzel
- problems with NSDoubleNumber,
David Wetzel <=