Ok, well according to the internet I found something.
So, I am trying this:
B4X:
Sub cmdTest_Click
Dim NativeMe As JavaObject
NativeMe.InitializeContext
NativeMe.RunMethod("show", Array As Object(txtTeamNameHome))
' MainForm.RootPane.MouseCursor = GetMouseCursor("NONE")
End Sub
#IF JAVA
public void show(TextField textField) {
textField.getProperties().put(FXVK.VK_TYPE_PROP_KEY, "numeric");
FXVK.init(textField);
FXVK.attach(textField);
}
public void hide() {
FXVK.detach();
}
#End If
Of course I get an error saying this:
src\md\sm1000\bs059rgbtnc\main.java:2354: error: cannot find symbol
public void show(TextField textField) {
^
symbol: class TextField
location: class main
1 error
Ugh. Yet another crash. I wish I knew Java but I dont...
B4X:
Waiting for debugger to connect...
Program started.
BrightSet: 160
Error occurred on line: 185 (Main)
java.lang.IllegalArgumentException: object is not an instance of declaring class
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:131)
at md.sm1000.bs059rgbtnc.main._cmdtest_click(main.java:2273)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:613)
at anywheresoftware.b4a.shell.S
hell.raiseEventImpl(Shell.java:228)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA$1.run(BA.java:215)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417)
at javafx.graphics/com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
at javafx.graphics/com.sun.glass
.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
at java.base/java.lang.Thread.run(Thread.java:844)
Waiting for debugger to connect...
Program started.
BrightSet: 160
Error occurred on line: 185 (Main)
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:131)
at md.sm1000.bs059rgbtnc.main._cmdtest_click(main.java:2273)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:613)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:228)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:159)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:93)
at anywheresoftware.b4a.BA$1.run(BA.java:215)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417)
at javafx.graphics/com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92)
at javafx.graphics/com.sun.glass.ui.monocle.RunnableProcessor.run(Run
nableProcessor.java:51)
at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ClassCastException: java.base/java.lang.String cannot be cast to java.base/java.lang.Integer
at javafx.controls/com.sun.javafx.scene.control.skin.FXVKSkin.getNodeVKType(FXVKSkin.java:357)
at javafx.controls/com.sun.javafx.scene.control.skin.FXVKSkin.updateKeyboardType(FXVKSkin.java:370)
at javafx.controls/com.sun.javafx.scene.control.skin.FXVKSkin.prerender(FXVKSkin.java:466)
at javafx.controls/com.sun.javafx.scene.control.skin.FXVK.init(FXVK.java:93)
at md.sm1000.bs059rgbtnc.main.show(main.java:2947)
... 26 more
Current code:
B4X:
Sub cmdTest_Click
Dim NativeMe As JavaObject = Me
NativeMe.RunMethod("show", Array As Object(txtTeamNameHome))
' MainForm.RootPane.MouseCursor = GetMouseCursor("NONE")
End Sub
#IF JAVA
import javafx.scene.control.TextField;
import com.sun.javafx.scene.control.skin.FXVK;
public static void show(TextField textField) {
textField.getProperties().put(FXVK.VK_TYPE_PROP_KEY, "numeric");
FXVK.init(textField);
FXVK.attach(textField);
}
public static void hide() {
FXVK.detach();
}
#End If
If I force javafx.userAgentStylesheetUrl to Caspian or Modena on the Raspberry Pi java commandline, the Virtual Keyboard loads perfectly. style and all
However on the PC, its the same deal. Only loads the key text.
If I leave that line undefined on the R-Pi, its same thing. text only.
I also have to start the app directly. I cant add the flags to the app itself, or the B4J bridge command line or it does the same thing, text only.