Re: Registering components under XULRunner 24

Benjamin Smedberg <[email protected]> Fri, 14 Feb 2014 12:16:14 -0500
Newsgroups gmane.comp.mozilla.devel.embedding
Message-ID <[email protected]>
On 2/13/2014 1:12 PM, Christian Sell wrote:
> doesnt work. I am creating the file like this:
>
> retval = directory->Get(NS_GRE_DIR, NS_GET_IID(nsILocalFile), (void **)&greDir);
> file->InitWithFile(greDir);
> file->AppendRelativePath(NS_LITERAL_STRING("components/components.manifest"));
>
> the contents of the components.manifest file are just one line:
>
> interfaces RegionCapture.xpt
>
> I still get NS_ERROR_FACTORY_NOT_REGISTERED when trying to access the component.

That's because the "interfaces" line only registers the interfaces, not 
the component. To register the component you use something like

http://mxr.mozilla.org/mozilla-central/source/toolkit/components/downloads/nsDownloadManagerUI.manifest

to register the "component" and "contract" entries

--BDS