jim
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
sg.stage(title: "Login Demo", show: true, onHidden:{System.exit(0)}) {
...
}
--
View this message in context: http://groovy.329449.n5.nabble.com/GroovyFx-Thread-tp5119325p5119613.html
Sent from the groovy - user mailing list archive at Nabble.com.
When defer is called it actually pushes a task on to a queue, then the JavaFX runtime
pops the queue and runs that task on the JavaFX thread.
Since "showPageContents" is pushed first, it must run to completion before "showProgress"
is popped and then run.
I am not sure what exactly you are doing in both methods, but
what I would do is, assuming the Stage is already visible:
1) Create one of the progress controls, (ProgressBar or ProgressIndicator)
assign it to the scene and set its visible attribute to true.
2) Do whatever is needed in showPageContents
3) Set the progress control visible to false, then remove it from the scene.
The Progress control runs its own timing thread while visible, and periodically updates the scene
with updates.
jim