Subj : Re: Querying the name of the function being called in the static To : netscape.public.mozilla.jseng From : David Bradley Date : Wed Mar 12 2003 04:57 pm Stephen Jones wrote: > Anyway, doing this is easy enough with properties, and it would be easy > enough to have static methods in the container, but the problem comes from > unpacking the parameters to the method. I would like to be able to abstract > this so that the "core"can dynamcally dispatch method calls with varying > arguements to the "containers", probably using some sort of Variant data > type for the parameters. The COMConnect code converts between jsval's and COM's VARIANT type. If you can't use VARIANT's and need to create your own, you could probably use that code as a model. Another thing of interest might be nsXPTCVariant. This is what's used in xptcall. http://lxr.mozilla.org/seamonkey/source/xpcom/reflect/xptcall/public/xptcall.h#103 The COMConnect code handles JS invoking IDispatch methods, and also provides exposing JS Objects as IDispatch interfaces. So it handles calls in both direction. David Bradley .