Re: Problems Registering a XPCOM component in XULrunner environment Re: Question: How to reliably create a XPCOM component for use with javaxpcom?
Benjamin Smedberg <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Message-ID | <4p-dnUnqUYDdNU3ZnZ2dnUVZ_s6dnZ2d__14132.7778612778$1154525453$gmane$org@mozilla.org> |
Martini wrote: > I just realized there's a more succinct way to describe my problem: > I have created a XPCOM standalone component that provides some service > that I want to access in my self contained XUL dev environment. > How do I register it so that it is available for use just like the > components in xulrunner/components What environment is this? A XULRunner app, or embedded? If it's a XR app, all you need to do is put the component in <app>/components and force reregistration of components. That's best done by changing the buildid in application.ini In embedded contexts, you will need to specify a directory to look for components during XPCOM initialization. You may also need to force component registration programmatically (nsIComponentRegistrar.autoRegister(null)). > The obvious way of registering with regxpcom is not resulting in the > updated components/*.dat files. No toolkit-based apps should ever use regxpcom. It is a holdover from the days when we kept compreg.dat in the application directory and is totally unreliable. --BDS