Open wise-coders opened 2 weeks ago
I already have a JavaFX application, with an embedded text editor. The editor is using something like this to execute the script I paste inside.
final GroovyShell shell = new GroovyShell( new GroovyConfig( ) ); final Script script = shell.parse( query, binding );
If I paste the demo below and execute it, I get this error: Application launch must not be called more than onece.
How can I avoid this?
import groovyx.javafx.GroovyFX; GroovyFX.start { stage(x: 100, y: 100, onShown: { println "Stage 1" }, visible: true, style: 'UTILITY') { scene(width: 100, height: 100, fill: GROOVYBLUE) } stage(primary: false, x: 100, y: 400, visible: true) { onShown { println "Stage 2" } scene(width: 100, height: 100, fill: RED) } }
I already have a JavaFX application, with an embedded text editor. The editor is using something like this to execute the script I paste inside.
If I paste the demo below and execute it, I get this error: Application launch must not be called more than onece.
How can I avoid this?