Subj : How init() gets called when using ScriptableObject.definClass To : netscape.public.mozilla.jseng From : Janusz Dalecki \(TYCO\) Date : Sat Sep 10 2005 08:26 pm I have created a Host Objects using Rhino 1.5. The code is below. Documentation says that first the constructor static void init(Scriptable scope) is called if exists and no further initialization is done. public class Devices extends ScriptableObject { private Category logger = Category.getInstance(Devices.class); private static ResponseContext context; private static org.mozilla.javascript.Context scriptContext; private static Scriptable thisScope; static void init(Scriptable scope) { thisScope = scope; } /** * Creates a new instance of Devices */ public Devices() { } /** Initialize context */ static public void setContext(ResponseContext ctx) { context = ctx; } // The class name is defined by the getClassName method public String getClassName() { return "Devices"; } public Object jsFunction_createFinder(String devType) { Finder f = new Finder((String)devType); return Context.javaToJS(f, thisScope); } } Hovewer my init function below is not called at all when I execute this line of code: ScriptableObject.defineClass(mScope, tycoint.odyssey.response.responseHostObjects.Devices.class); Any help very appreciated. Regards, Janusz .