Hi,

I have the following:

class A extends ScriptableObject
{
    ...
    private B b;

    public B jsFunction_getB()
    {
        return b;
    }
}

class B extends ScriptableObject
{
    ...

    public String jsGet_name()
    {
        return "name";
    }
}

If I call in JavaScript:

var b = new B();
b.name

everything is fine. If I do:

var a = new A();
a.getB().name

then I am told that the field name is undefined. All the Java
properties of the B object are correct, but none of the JavaScript
fields/methods seem present.

I have tried using javaToJS in jsFunction_getB() to no avail (not that
I think I should need to, as B is a ScriptableObject). Anyone have any
idea as to what I'm missing here?

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

Reply via email to