I added the space to make the Euro work. That and adding the
currencysymbol worked for values with and without the euro
symbol. Without the space the euro parsing didn't work
if the euro symbol was present. If that doesn't work the same
for dollars I'd suggest doing a few try catches with
symbol+space, symbol, currency code + space and
currency code added.
Stephan
On Mar 13, 6:40 pm, "Eitan Suez" <
eitan.s...@gmail.com> wrote:
> stephan,
>
> i'm in the process of making the change to USDollarEditor.
> i'm noticing that when the currency is the us dollar,
> putting a space in between the currency symbol
> and the value (as you show) causes the parsing
> to fail. i.e.:
> Number number = _currencyFormat.parse(stringValue);
> (in USDollar) throws a ParseException.
>
> did you make changes to USDollar that you didn't mention
> in your email?
>
> thanks,
> / eitan
>
> On Wed, Mar 12, 2008 at 10:34 AM, Eitan Suez <
eitan.s...@gmail.com> wrote:
> > hi stephan,
>
> > thanks for the fix. i'll check it in later today.
>
> > i think in general the implementation
> > could use a bigger overhaul. the major bug
> > with the implementation is that it does not
> > avoid floating point rounding errors at the
> > moment. i need to ensure the amount is
> > kept in a bigdecimal and stored in a compatible
> > database field type.
>
> > separately, it'd be nice if currencies were
> > designed from the start with multicurrency
> > support in mind. usdollar at the very least
> > should be renamed as you suggest.
>
> > i'll try to target this work for the next release.
>
> > / eitan
>
> > On Wed, Mar 12, 2008 at 5:02 AM, Stephan Eggermont > <
step...@stack.nl>