On Dec 3, 2:15 pm, Christophe Grand <[EMAIL PROTECTED]> wrote:
> Try to call setJavaPrimitiveWrap(false) on your WrapFactory.
>
> Christophe
>
> Rhino user a écrit :
>
> > In my java code I am returning an array of doubles like (new Double[]
> > {new Double(0),new Double(712),
> > new Double(0),new Double(692)})
>
> > The javascript looks like this --
> > var inch = 72;
> > var aRect = this.getPageBox( {nPage: 0} ); -- returns the Double
> > array as above
> > aRect[0] += .5*inch; // from upper left hand corner of page.
> > aRect[2] = aRect[0]+.5*inch; // Make it .5 inch wide
> > aRect[1] -= .5*inch;
> > aRect[3] = aRect[1] - 24; // and 24 points high
>
> > the operation aRect[0] += .5*inch; does string concatenation rather
> > than double addition.
> > I tries wrapping the double array in to Context.javaTojs also. Same
> > result.
> > so 0.0 + 36 becomes 0.036 rather than 36.0.
> > Am I doing something wrong?
> > Thanks
> > -Anupama
yes. That does it.
Thanks
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino