B4J Question B4XFloatTextField

RUNO

Active Member
Licensed User
Longtime User
Hello everyone
If I used B4XFloatTextField
In code
B4X:
B4XFloatTextField1.TextField.SetTextAlignment("TOP","RIGHT")
no problem
but if I used multiline option , error happend

can anyone help
 

aeric

Expert
Licensed User
Longtime User
Please copy and post the error you got.
 
Upvote 0

RUNO

Active Member
Licensed User
Longtime User
Please copy and post the error you got.
B4X:
Waiting for debugger to connect...
Program started.
Error occurred on line: 460 (B4XFloatTextField)
java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
    at java.base/java.lang.reflect.Method.invoke(Method.java:578)
    at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:489)
    at b4j.example.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:875)
    at b4j.example.b4xpagesmanager._showpage(b4xpagesmanager.java:354)
    at b4j.example.b4xpagesmanager._addpage(b4xpagesmanager.java:175)
    at b4j.example.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:189)
    at b4j.example.b4xpagesmanager._initialize(b4xpagesmanager.java:125)
    at b4j.example.main._appstart(main.java:85)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    at java.base/java.lang.reflect.Method.invoke(Method.java:578)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:632)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:237)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    at java.base/java.lang.reflect.Method.invoke(Method.java:578)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:117)
    at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:100)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:104)
    at b4j.example.main.start(main.java:38)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:847)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:484)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:1589)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:134)
    at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:81)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    ... 28 more
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:119)
    at java.base/java.lang.reflect.Method.invoke(Method.java:578)
    at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:115)
    ... 30 more
Caused by: java.lang.RuntimeException: Type does not match (class javafx.scene.control.TextArea)
    at anywheresoftware.b4a.objects.B4XViewWrapper.typeDoesNotMatch(B4XViewWrapper.java:595)
    at anywheresoftware.b4a.objects.B4XViewWrapper.SetTextAlignment(B4XViewWrapper.java:470)
    at b4j.example.b4xmainpage._b4xpage_created(b4xmainpage.java:59)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    ... 32 more
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
When I have got this error in the past for an other case, it meant that I was passing to the void (in Java level) values that were of different type than the type accepted.
 
Last edited:
Upvote 0

aeric

Expert
Licensed User
Longtime User
Caused by: java.lang.RuntimeException: Type does not match (class javafx.scene.control.TextArea)
I think the error is here.
TextField vs TextArea.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
B4X:
Dim jo As JavaObject = B4XFloatTextField1.TextField
jo.RunMethod("setNodeOrientation", Array("RIGHT_TO_LEFT"))

 
Upvote 0
Top