Sorry for the spam, it was a typo in the cid.

A+
-AJ

Antoine Junod <[EMAIL PROTECTED]> writes:

> Hi,
> 
> I've build firefox and written my first xpcom element following a
> really good tutorial [1]. All worked really fine until I had to test
> my xpcom component.
> 
> The extension itself appears in the Tools->Add-ons message box. But a
> try to accessing it returns
> 
>      TypeError: Components.classes[cid] has no properties
> 
> I'm using the following JS code:
> 
> function doXPCOM() {
>   try {
>       
> netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
>       const cid = "@starkravingfinkle.org/specialthing;1";
>       var obj = 
> Components.classes[cid].getService(Components.interfaces.IFirstXpcom);
>     alert("done");
>   } catch (err){
>       alert(err);
>   }
> }
> 
> 
> Any idea? In wich direction could I dig?
> 
> Thanks for your reply.
> -AJ
> 
> [1] 
> http://zenit.senecac.on.ca/wiki/index.php/Real_World_Mozilla_First_XPCOM_Component
> _______________________________________________
> dev-tech-xpcom mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-xpcom
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to