My company started using rhino in 2001, and has been working great for
us since then. The original developer of our code base has been gone
for 3 years now, and I've only intermittently needed to make changes.
However, recently I've recently dived back into our code base to make
a few enhancements.

We are using Rhino 1.5 release 5

I'm running into a gotcha that I can't figure out.

The other class I changed finds my new method fine.

Both classes are defined classes like this:
ScriptableObject.defineClass(jsScope, WebDocument.class);
ScriptableObject.defineClass(jsScope, JSFormSelect.class);

I was able to add a jsFunction_Something to the first class
(WebDocument) and have it work fine.
When I try the same with the second class, I get a TypeError
Exception: jsFunction_toString is not a function.

The way the two objects are created is different. For the first
object, I use:
Scriptable jsDocument =
jsContext.newObject(threadScope,"WebDocument",jsArgs);

The second one I'm creating inside of a running javascript via the new
operator:
var mySelect = new Packages.package.stuff.JSFormSelect();

The object does get created, I believe correctly.

Does anyone have some pointers? How can I check that I am indeed
getting the object created, and why might I not have access to the
jsFunction_ methods in JSFormSelect ?

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

Reply via email to