Subj : Re: request for new feature in spidermonkey (or workaround) To : netscape.public.mozilla.jseng From : Shanti Rao Date : Mon May 10 2004 11:08 am Search this list's archives. If you use argv[-2], you can get the function name. That's what I used to implement ActiveX in SM. Shanti > Hi, > > In the getter protoype, there is an extra parameter "tinyid" enabling the > getter function to know which member of the object was requested. > > I can't find any way to do the same things with methods (i'd like > spidermonkey to call the c++ function associated with the js method with an > extra parameter containing kind of tinyid identifying the called method. > > The reason why i want to do that is that i want to make available to > javascript some objects i don't know about at compile time (since i cant > create the wrappers at compile time, i would need to create'em at runtime, > but it doesn't seem to be possible in c++) > > The member functions of the c++ objects are called via a message system, so > with the extra parameter i'm asking for, i would be able to determine the > message id to send, according to the tiny id provided by spidermonkey > > is such an improvement possible in spidermonkey? > > is there another way to do what i'd like to do without messing with the way > spidermonkey works? > > A possible workaround would be to generate a c++ file containing the > wrappers at run time, to compile it into a dll, and to link it, but i dont > want to go into such a trick for now:) > > Thanks for the hints :) > > > .