Subj : Re: Calling a function within an object To : netscape.public.mozilla.jseng From : meisterderdinge@gmx.net (Zaph) Date : Tue Mar 02 2004 01:21 am Hi, thanks for your answer. Brendan Eich wrote in message news:<4043B71B.8010201@meer.net>... > > Those are not references to any properties you've defined. Do you mean > xxx.prototype.add and xxx.prototype.add2, or perhaps yyy.add and yyy.add2? Yes, i meant "yyy.add" and "yyy.add.add2" > >from C++. I need to do this directly and without other functions (i.e. > >calling the functions inside the script). > > > > > > Try JS_EvaluateScript? "JS_EvaluateScript" is for compiling and executing the script, and I already do that with JS_CompileFile and JS_ExecuteScript. After that I can call the "test" function. But I cannot call any functions within the object "yyy", which was created at the execution of the script. I need to do this because I want to create some sort of a C++-class-like object tree where each object has individual methods and variables that can be called from C++. .