I've got at least a start at a jsr223 script engine I've written to use
JavaFX from Ringo - I'm calling it RingoFX :).
It's working pretty well on a simple example - maybe kind of neat if JavaFX
ever gains some traction. I'm using it along with the new JavaFX Scene
Builder where you can drag/drop your UI design, but instead of java for the
"controllers" I'm using Ringo (CommonJS) modules.
But I'm struggling a bit with a second example where I was attempting to
convert this iTunes search UI over to Ringo:
My code is failing to resolve types when I'm calling into java methods from
e.g. Here's some (abbreviated but) pretty simple code that's creating a
javaFX "ImageView" to use a graphic on the search button:
var searchImageView = new ImageView(new
view.searchButton.graphic = searchImageView;
And I can see in the debugger this is all working fine until that last line
(view.searchButton.graphic = searchImageView;) where it gives the error:
ImageView@37806b to javafx.scene.Node.
style ".graphic = X" form:
But just to make sure that's not the problem, I switch that line to the
standard form i.e.:
But I get the similar just slightly different error as follows:
In the debugger I double checked the types e.g.:
So I feel like it's a failure to recognize ImageView "isa" Node. But I
don't know why - ImageView directly extends javafx.scene.Node as seen here:
So no "conversion" should be needed(?)
If it matters I should mention too that I saw the post about the issue with
JavaAdapter in Rhino 1.7R4:
And I am using the rhino-1.7R5-SNAPSHOT.jar with Ringo. So I don't think
that's the problem...