This content has been marked as final. Show 3 replies
How can I hook JRuby into an FXML user interface design?The answer to that question lies in the stackoverflow question "Using fxml with jruby"
If you want to pop up an alert, create an alert dialog in JavaFX and invoke that from your script.
For a JavaFX standard dialog box library see: http://fxexperience.com/2012/10/announcing-the-javafx-ui-controls-sandbox/
I believe (and I could be wrong) that JavaFX 2.2 is using a modification of the Rhino engine, which you can find documentation on here:
I believe (and I could be wrong) that JavaFX 8 will use a Nashorn engine:
To further answer your question about jruby and fxml, this gem is for working with JavaFX and FXML in JRuby: https://github.com/nahi/jrubyfx and comes with an executable which will examine FXML and create stubbed out ruby files for you, with the controller's and stuff all ready for you to use. In fact, I even made a Sublime Text plugin that makes that even easier to use: https://github.com/edubkendo/SublimeJRubyFXML though you most likely use an IDE. The ruby gem has a getting started guide: https://github.com/nahi/jrubyfx/blob/master/Getting%20Started.md which should help, and has quite a few examples as well. Hope that helps.
Edited by: e-dubkendo on Jan 22, 2013 9:54 PM
Oh that's great e-dub, jrubyfx didn't have fxml support a couple of month ago - it's nice to see the project progressing and the documentation is nice and friendly too.