Re: [ANN] Scriptom: COM Scripting in Groovy
Salut Cédric,
Cedric Beust wrote:
> This would be very useful, and as a proof of concept, I would love to see a
> BrowserHelperObject implemented in Groovy (for those of you not familiar
> with BHO's, they are pieces of code that receive events from Internet
> Explorer and that can query value from IE, such as the content of the page
> just loaded, access to its DOM, etc...).
A BHO is a pretty neat idea for showing how to wire event handling
between Groovy and ActiveX/COM components!
I'm almost there, but not yet
In CVS Head, I've added support for event handling, but there are still
some problems with Groovy and/or with some components, such as the one
from Internet Explorer.
The idea is that we can write:
myComponent.events.OnLoad = { println "loading" }
myComponent.events.Quit = { println "quit" }
myComponent.events.listen() // to wire everything
That's pretty weird: it works from a Java file evaluating a Groovy
script with GroovyShell.evaluate(myScript). But with groovy
myScript.groovy, it just hangs the JVM.
Is it a problem with class loaders, or something else, I have no clue at
the moment.
When doing that from java, with Internet Explorer, I have another problem:
(Continue reading)