On Feb 23, 3:31 pm, "Pantvaidya, Vishwajit" <[email protected]>
wrote:
> I am having an issue in the following JavaScript after upgrading to 1.7R1 
> from 1.5R5.
>
> //component is a context variable which points to an instance of a Java class 
> ComponentEvaluator. So this calls getValue on that instance and returns an 
> object of type USDParameter upcasted to java.lang.Object.
>
> var amount1 =component.getValue("paymentAmount");
>
> var amt1Curr=amount1.getCurrencyCode();
>
> The object USDParameter has a method getCurrencyCode(), so the above 
> javascript should work fine - and it used to work upto Rhino 1.5R5. But now 
> in 1.7R1 it gives the error "...getCurrencyCode not found...".
>
> Is that because of the upcasting to java.lang.Object? Is this a bug in 
> Rhino1.7R1?
>
> After an earlier communication with Norris about this, I had created an 
> eclipse project to reproduce this scenario. If it helps, I can send that out.

I took a quick look. You need to make your USDParameter class public
in order to be able to call methods in it. We tightened up some of the
access checking between releases. Sorry for the disruption.

--Norris


_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to