On Feb 26, 10:28 am, chris idr <[email protected]> wrote:
> hi
> i'm getting this error in rhino.
> and I think i have all the methods to capture it, but it is still
> throwing the error
> please can anyone help???
>
> regards
>
> chris
>
> Java class "org.jpedal.objects.raw.FormObject" has no public instance
> field or method named "textColor". (<javascript>#52) executing code=
>
> from code where
> color.black is defined by me
> public final static float[] black = new float[]{0};
>
> curField.textColor = color.black;
>
> and in the FormObject code i have these methods.
>
> public void setTextColor(float[] color) {
> ...
>     }
>
>     public void settextColor(float[] color){
>         System.out.println("FormObject.settextColor(float[])");
>         setTextColor(color);
>     }
>
> public void setTextColor(Object jscolor){
>         ...
>     }
>
>    public void setTextColor(org.mozilla.javascript.NativeArray jscolor){
>         ...
>     }

I just did

public class Test {

    public float[] a = { 3.7f };

    public void setTextColor(Object jscolor) {
        System.out.println("Object");
    }

    public void setTextColor(float[] color) {
        System.out.println("float[]");
    }

    public void setTextColor(org.mozilla.javascript.NativeArray
jscolor) {
        System.out.println("NativeArray");
    }
}

Then, in the Rhino shell:

js> t = new Packages.Test();
t...@1858610
js> t.textColor = t.a;
float[]
[...@12498b5

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

Reply via email to