ok - forget my problem, i found the real reason. here's a copy of the mail to the pyxpcom-mailinglist at activestate (although it seems that nobody reads this list...)

-----------------------

me again. i have found out that i must use regxpcom.py instead of regxpcom, to get my python components registered. this was not in the documentation and therefore took me some time to realize.

now, when i load the component in python, it works:

Python 2.4 (#2, Dec  7 2004, 15:10:50)
[GCC 3.3.3 (SuSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from xpcom import components
>>> import xpcom
>>> cls = components.classes["@umc/nsIUmcTest;1"]
>>> ob = cls.createInstance(components.interfaces.nsIUmcTest)

but when i use xpcshell, it fails:
js> const Simple=new Components.Constructor("@umc/nsIUmcTest;1", "nsIUmcTest");
js> var s=Simple();
:3: Component returned failure code: 0x80570015 (NS_ERROR_XPC_CI_RETURNED_FAILURE) [nsIJSCID.createInstance]


and why? i don't know. but i have a guess - i need to import the xpcom.server-modules to get my python-loader installed. otherwise python files are not loaded. and since xpcshell (or mozilla or any other binary) do not do that, they fail to load the component.

but if my assumption is correct, where are the patches for mozilla-bin, xpcshell etc?

thanks in advance,
chris
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to