Subj : Re: SpiderMonkey: implement property of type object with get/set To : netscape.public.mozilla.jseng From : Benjamin Smedberg Date : Fri Sep 26 2003 02:23 pm Yuraukar wrote: > I have a class Customer that has a reference to a class Account, e.g. > > class Customer > { > ... > int nID; > Account account; > ... > }; > I am stuck at the code for the property getter (e.g. JSGetProperty). What > am I supposed to write to return an existing C++ instance as a result? you can't return a c++ object, because spidermonkey has no knowledge of it. What you need to return is a JS object-wrapper for the account class. --BDS .