Subj : Exporting Object Constructor To : netscape.public.mozilla.jseng From : Brian Genisio Date : Thu Feb 12 2004 09:55 am Hi all, I am creating a whole bunch of objects that have interfaces in my spidermonkey code. I use JS_InitClass to do this. Everything is accessable through my global object, and all of my objects are working well. Now, I have a class named MyClass, which I want the user to be able to create a new class: var my_new_class = new MyClass(arg1, arg2); In my JS_InitClass, I have defined a constructor, but it never gets called. In fact, the JS_ExecuteScript quietly exits when I do this. Any Ideas to what I am missing? Do I need to create a MyClass method in my global class, in order to construct the object? That shouldnt be that hard, but I guess I assumed that the MyClass constructor would be called automatically, using new. Thanks, Brian .