Subj : Re: Duplicate functions help plz To : Mingozzi From : Brendan Eich Date : Thu Jun 24 2004 11:17 am Mingozzi wrote: > I have something like this: > > -inst1 > -childAlfa > _function foo1 > _function foo2 > > -inst2 > -childAlfa > > I need to copy all function from inst1.childAlfa to inst2.childAlfa. > I tried width JS_DefineProperty and JS_CloneFunctionObject but with no > success... > Can u help me? Show your code, please. Why did you use JS_CloneFunctionObject? If you want inst1 and inst2 to share the same "methods", then you should define the functions once, in their common prototype object. JS_InitClass is the API to do that. /be .