Hi embedders! I'm very happy the day I found Mozilla GRE as Active-X ready for embedding in my application-development. In my case its wxPython, and I can swap IE-activex with mozilla.
I post a little story about my last - very interesting - days or week... maybe inspiring for others where you can go today, and what hurdles could come up spontanious. Environment: windows XP pro, python2.3.5, nevow0.6.0, wxPython 2.4.2, java1.5.0_05 mozilla1.7.12 in two flavours: - Adam Lock's "Mozilla ActiveX Project" http://www.iol.ie/~locka/mozilla/mozilla.htm - original "all-inclusive" windows-installer from mozilla http://www.mozilla.org/releases/#1.7.12 installing -- registering the active-x -- ready regsvr32 mozctlx.dll First impressions are "Yeah! that was easy!" Unfortunatly I'm squeezing my browser-components to the limit :-) - AJAX with persistent requests (nevow athena livepages, based on mochikit library) - embedded Applets with LiveConnect (netsscape JSObject) to bridge Java/Javascript - using more than one browser instance in my wxPython, like widgets - talking from python with pyXPCOM to instances to get (for example) access to DOM OK... what went wrong (and good): 1- two browser (instances of MozillaBrowser) under one wxFrame, and only the latter got keyboard-focus on html-input or textareas 2- trying over XPCOM to get the nsIWebBrowser from nsIWindowWatcher.getChromeFromWindow(...) fails with returning null (maybe this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=246632). I want to make a nsIWebBrowser.activate() 3- Bypass for 2- got right COM interface to send a WindowMessage (extra invitation) to activate focus! But don't ask how long the right com-fiddling needed... thanks god for sourcecode and interactive interpreter exploration of COM and XPCOM interfaces with python!!! 4- no problems till now with AJAX and livepage (persistent connection to webserver) :) 5- Java applet with LiveConnect (import netscape.javascript.*;) don't work with embbeded mozilla active-x. Cannot get JSObject win = JSObject.getWindow(enclosingApplet); Strange, cause same thing works in Firefox 1.0.7, Mozilla 1.7.12 and actual IE! Only as active-x access with getWindow() breaks. And boy, believe me... I've read nearly all bugzilla, google-groups and Java-bugs... no idea where the difference come from 6- to bypass 5- I've swapped mozilla 1.7.12 active-x with mozilla 1.7.12 active-x. Seriously: Adma Locks binaries with official Mozilla-AllInclusive-Windows-Installer. Different sizes of mozctlx.dll and others. SUCCESS... the JSObject thing works... WHY??? 7- PANIC with last choosen configuration, embbeded Mozilla don't show any html-input or even textarea field anymore! Lost again. No search boxes, no textedit in blogs... vanished! Test it: register your mozilla as active-x: regsvr32 mozctlx.dll, open http://www.iol.ie/~locka/mozilla/mozctltest2.htm in InternetExplorer and navigate for example to www.python.org. Check it double with a "normal" browser and you can see a search box right/top... but not in the embedded version! But you have a working LiveConnect between java and javascript :-) Adam Lock's binaries cannot handle JSObject, mozilla.org binaries fails with html-input/textareas... I have a decision-problem, cause I want all! So am I. What is the deeper secret to harmonize this obviously different builded kids of same mozilla-1.7.12-sourcetree? How to make the right mix of build-instructions??? I have no idea! And till now I have not even touched a compiler to make any of this things (mozilla, pyXPCOM, Active-X) build by myself... and I would really appreciate it don't do this in future, too! But hey... if it's worth! But as a first resume: I'm not really frustrated. Too much is happened last days with gecko, xpcom and I'm dreaming of powerful applications builded upon this. Mozilla active-x brings the power of XPCOM, COM, XUL, AJAX to python... I love this power!!! Really... I have managed a much of hurdles (a highlight: communication from pyXPCOM to started COM-MozillaBrowser instances via nsIObserverService cause they share the same xpcom.dll, very cool!!!) But... where is the guru, who has such deep insights, to give me a hint, where to go from here? I don't wanna stop with it, and I cannot kick one of my requirements (e.g. textareas or applet/javascript bridge). Thanks for reading, thanks for questions, thanks for feedback. Every bit can help! Researching of internet-resources, googling and sourcecode-analysis are come to dead end actually. greetings from Munich, Germany Peter (=PA=) This development-story belongs to the http://smartdoccer.org project, where this things (and much more: Wikipedia, Wordnet, CIA World Factbook) would be mixed together for a revolutionary writing-tool. And we are close to first beta. _______________________________________________ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding