bug when creating my WindowCreator
Sylvain Ferriol <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.java |
|---|---|
| Message-ID | <86ednZ0oD8MbYFzYnZ2dnUVZ_segnZ2d__12916.451044339$1170341759$gmane$org@mozilla.org> |
hello
i create MyWindowCreator which implements nsIWindowCreator
as explained in JavaXPCOM:Embedding Mozilla in a Java Application using
JavaXPCOM
Mozilla mozilla = Mozilla.getInstance();
WindowCreator creator = new WindowCreator(); // implements
nsIWindowCreator
nsIServiceManager serviceManager = mozilla.getServiceManager();
nsIWindowWatcher windowWatcher = (nsIWindowWatcher) serviceManager
.getServiceManagerByContractID(NS_WINDOWWATCHER_CONTRACTID,
nsIWindowWatcher.NS_IWINDOWWATCHER_IID);
windowWatcher.setWindowCreator(creator);
but when i call windowWatcher.openWindow:
Exception in thread "main" org.mozilla.xpcom.XPCOMException: The
function "openWindow" returned an error condition (0x80004005)
at org.mozilla.xpcom.internal.XPCOMJavaProxy.callXPCOMMethod(Native Method)
at
org.mozilla.xpcom.internal.XPCOMJavaProxy.invoke(XPCOMJavaProxy.java:140)
at $Proxy2.openWindow(Unknown Source)
at TestWindowCreator.main(test_window_creator.java:133)
and the content of createChromeWindow is never executed
sylvain