> Since he's calling "multiply" directly, perhaps his needs are less
> complex. At any rate, this works in Rhino as you'd expect:
>
> js> var SourceAmount = new java.math.BigDecimal("32.2")
> js> var Rate = new java.math.BigDecimal("12.1")
> js> SourceAmount.multiply(Rate)
> 389.62
I think the symptoms indicate something like:
js> var a = makeDecimal();
js> var b = a.multiply("2.2");
where makeDecimal is a Java method returning a java.math.BigDecimal.
Whereas new java.math.BigDecimal() in Rhino causes Rhino to set up the
prototype, etc., simply returning a BigDecimal from a Java function
will not do so.
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino