JavaFX FXML magic

34 views
Skip to first unread message

Jörg Wille

unread,
May 18, 2015, 5:35:21 PM5/18/15
to rob...@googlegroups.com
I just tried out javafxport, which uses robovm 1.2 under the hood, to do a small javafx iOS demo, using FXML.
I was surprised that everything simply worked! Even when I just added a control only in FXML-file without adding it in the controller, robovm recognized it and it worked.
Next I changed the java event handler in the controller to a javascript event handler, which I added in the fxml-file. Running the app on MacOS worked, but running on IPhoneSimulator did not work.
Is this not working because I need to add some forceLinkClasses or can this not work at all because iOS does not allow JIT.
My actual question is: Is it possible to load external fxml files (even with script handlers) into an running iOS app (if all Classes were added with forceLinkClasses) using robovm? Has anyone tried this?

Mario Zechner

unread,
May 18, 2015, 6:02:57 PM5/18/15
to rob...@googlegroups.com
JavaScript is likely done using Rhino/Nashorn on the desktop. Iirc, that uses dynamic byte code loading at runtime which RoboVM can't support, as we have to AOT compile all bytecode. If you can write you handlers in Java, and force link them, then loading FXML on the fly should work.
Reply all
Reply to author
Forward
0 new messages