I keep getting this warning and I cant figure out why.
TypeError: Cannot find default value for object. (<cmd>#1)
I get it with this code:-
code = "event.value = util.printd("mmmm d, yyyy", new Date());";
Object testjs_event = org.mozilla.javascript.Context.javaToJS( testjs,
scope );
org.mozilla.javascript.ScriptableObject.putProperty( scope,
"event", testjs_event );
Object testjs_util = org.mozilla.javascript.Context.javaToJS( testjs,
scope );
org.mozilla.javascript.ScriptableObject.putProperty( scope,
"util", testjs_util );
Object result = cx.evaluateString(scope, code, "<cmd>", 1, null);
The testjs is an object of class with these javascript methods in:-
private int value = -1;
public void jsConstructor(int inVal)
public int jsGet_value()
public void jsSet_setValue(int inVal)
Can anyone shed any light on this situation please?
Kind Regards all
Chris wade
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino