Hi all,
I've been reading up on Pivot to see if I'd be happy to use it as a
replacement for the simple Swing applications I sometimes need to write,
specifically because of the richness of the widgets that Pivot provides.
Now, I prefer to write my small apps using Groovy, as a script. And I'm
not really seeing how the Pivot API fits into this model. Let me explain
with the following simple/dummy groovy script that opens 2 windows:
import groovy.swing.SwingBuilder
def builder = new SwingBuilder()
def f1 = builder.frame(title: 'Frame 1', pack: true, location: [100,
100]) {
label(text: 'Frame 1')
}
def f2 = builder.frame(title: 'Frame 2', pack: true, location:
[300,300]) {
label(text: 'Frame 2')
}
f1.show()
f2.show()
println "do other stuff"
sleep 10*1000 // simulate "other stuff"
f1.dispose()
f2.dispose()
So far what I've read about Pivot tells me that in order to open an
application window, I need to write a class that implements Application,
and then use DesktopApplicationContext.main() to launch that. That
doesn't really seem to fit into the "scripting" paradigm for me. Is
there any way to get around this requirement of going through
DesktopApplicationContext and a class implementing Application?
Maarten