Hope this is the right section...
I'm playing around with B4J and trying to wrap a basic test library.
In my layout, I have a button but when trying to compile so I can call my method through my wrapper, I get an error saying that "String cannot be converted to ActionEvent". When I compile I get this error:
B4J version: 4.70
Parsing code. (0.00s)
Compiling code. (0.03s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Compiling generated Java code. Error
B4J line: 39
ocv.startCamera(button1_Action)
javac 1.8.0_66
src\b4j\example\main.java:93: error: incompatible types: String cannot be converted to ActionEvent
_ocv.startCamera((javafx.event.ActionEvent)(_button1_action()));
^
1 error
In my wrapper I have this method:
public void startCamera(ActionEvent event){//do something}
I tried doing this in my B4J-code:
Sub button1_Action
ocv.startCamera(button1_Action)
End Sub
but it does not work.
So in B4j, what shall I pass as a parameter for my startCamera-method which takes "ActionEvent event" as an argument?
Related question: I tried both with the Internal designer and SceneBuilder but got same result. When wrapping, are there any differences to take into consideration when using the Internal Designer or is it fully compatible with SceneBuilder?