Pete Collins wrote:
> 
> var impl = Components.classes['some/prog/id'];
> 
> Can someone tell me what the method impl.initialize() is for?
> And what arguments it takes?
> 
> Thanks
> 
> --pete

'initialize' is a method of nsIJSID
http://lxr.mozilla.org/seamonkey/source/js/src/xpconnect/idl/xpcjsid.idl

It takes an iid string. All of its implementations allow only one
successful call; i.e. if the object has already been initialized
then future initialize calls will fail. All of the objects in the
classes, classesByID, and interfaces arrays are already
initialized. So, this method is of no use to you.

If you were to create one of these objects via the component
manager then you could call that method. But the prefered way to
create such an object is to use Components.ID. See:
http://www.mozilla.org/scriptable/components_object.html#_ID

The only reason I know of for making a new id in JS is when one
creates a CID to use in registering a factory from JS code.
http://lxr.mozilla.org/seamonkey/source/xpcom/sample/nsSample.js#90


John.

Reply via email to