Subj : C embedding question: failure in JS_DefineFunction To : netscape.public.mozilla.jseng From : "Pavel Podgoretsky" Date : Mon Mar 17 2003 06:28 pm Greetings, I am trying to create a wrapper around a C function via JS_DefineFunction( ctx, myobj, "Open", &native_fn, 0, 0 ) where myobj was previously created with JS_NewObject( ctx, &s_jsclass, 0, 0 ) I had this or very very similar code basically working a couple of years ago [I think this statement is weak enough to be accurate :) ], but now I get an error. Basically it seems to come from the following code in jsobj.c, function GetClassPrototype( ): if (!FindConstructor(cx, scope, name, &v)) return JS_FALSE; where 'name' is "Function" and 'scope' is the 'myobj' from above. I am using spidermonkey version 1.5-rc4a [I'd rather postpone upgrading to 1.5-rc5 due to timing/"stability"issues -- or should I upgrade?]. (I've also tried other combinations of New/Define etc.) If anyone has * any ideas to get me over this; * or any pointers to docs other than the ones linked from the spidermonkey page, it would be GREATLY appreciated. Thank you, -Pavel Podgoretsky .