B4J Question SOLVED -- [B4X] [XUI] SD_xComboBox error in clean function

Mariano Ismael Castro

Active Member
Licensed User
Hello, this library apparently has an error when after loading x amount of items..... you want to use the clear function to clear the combobox.
That happens if the EditableText property is not active.
Error:
Error occurred on line: 312 (SD_xComboBox)
java.lang.ClassCastException: class javafx.scene.control.Label cannot be cast to class javafx.scene.control.TextInputControl (javafx.scene.control.Label and javafx.scene.control.TextInputControl are in module javafx.controls of loader 'app')
    at anywheresoftware.b4a.objects.B4XViewWrapper.setEditTextHint(B4XViewWrapper.java:320)
    at b4j.example.sd_xcombobox._clear(sd_xcombobox.java:143)
    at b4j.example.b4xmainpage._btncombo2clear_click(b4xmainpage.java:121)
    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:566)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:629)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:234)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:167)
    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:566)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:111)
    at anywheresoftware.b4a.shell.ShellBA.raiseEvent2(ShellBA.java:100)
    at anywheresoftware.b4a.BA$1.run(BA.java:236)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
    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:174)
    at java.base/java.lang.Thread.run(Thread.java:834)

I have attached an example that shows the error.
 

Attachments

  • TestSDComboBox.zip
    9.1 KB · Views: 42
Top