Christian Biesinger wrote: > Doug Turner wrote: > >> Christian Biesinger wrote: >> >>> Hello! >>> What exactly is the difference between RegisterFactory and >>> RegisterFactoryLocation? What does the latter do that the former >>> doesn't? >> >> >> One registers an instance of a nsIFactory. The other registers a file >> location of a component. See nsIComponentRegistrar.idl. > > > OK... > >>> Can I change existing code to use RegisterFactory instead of >>> RegisterFactoryLocation and will it still work? >> >> >> Depends on exactly what you are trying to do. Do you already have a >> nsIFactory? If so, converting to registerFactoryLocation() doesn't >> make too much sense. > > > No, no... Current code uses RegisterFactoryLocation. I would change the > way this code works and it would be easier for me to use RegisterFactory. > > I don't necessarily have an nsIFactory, but I can get it easier than the > things I need for ...Location. > > I'm more or less trying to make an existing component accessible with > another contract id (required by Mozilla architecture...).
You realized that RegisterFactory does not persist fom one run to the next, right? Do you really have a situation where you want to create a factory and register it on every run whether it is going to be needed or not? John. >
