Hi there,

i have created a host object and have got some problems with it; it seems 
that the setters are not called if i have in the scipt some line like 
"result.value='test'".
Furthermore, could you give me a hint how i implement a js setter for a 
string array, something like this does not work "public void 
jsSet_flags(STring[] flags) { this.flags=flags; }".

Is it possible to just use the return value from a func call and work with 
this ScriptableObject further on the Java side?

Thanks for your help and best Regards

Normen


--------------------------

ScriptableObject.defineClass(scope, Result.class);
Object[] resultArgs = new Object[0];
Scriptable result = con.newObject(scope, "Result", resultArgs);
result = Result.wrap(transResult,result);
Object args[] = { result };
if (func != null)
{
       Result res = (Result)(Scriptable)func.call(con, scope, scope,args);

       if (res!=null)
       {
            //do some traces of the actual state of the result
        }


----------------------------------------
Result Class extends Scriptable Object:
----------------------------------------
private String value;
public float jsGet_quantValue() { return java.lang.Float.NaN; }
public String jsGet_qualValue() { return value; }

public void jsSet_value(float value) { 
this.value=java.lang.Float.toString(value); }
public void jsSet_value(String tst) { this.value=tst; }


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

Reply via email to