Bug? ComboBox

GiulioVale

Active Member
Licensed User
Longtime User
Hi,
with new internal design I make a simple form and put inside a ComboBox.

If i load this form there is an error like
Code: Copy
Program started.
java.lang.RuntimeException: java.lang.StackOverflowError
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:114)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:82)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
    at b4j.example.main.start(main.java:36)
   ...


Any help?
 
Works fine here. Can you post the full error message from the logs?

Check the libraries versions. Should be:
SS-2015-07-28_08.04.55.png
 
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)

Windows 8.1
 
Please try the following code:
Code: Copy
Sub Process_Globals
   Private fx As JFX
   Private MainForm As Form
End Sub

Sub AppStart (Form1 As Form, Args() As String)
   MainForm = Form1
   MainForm.SetFormStyle("UNIFIED")
   MainForm.Show
   Dim cb As ComboBox
   cb.Initialize("")
   MainForm.RootPane.AddNode(cb, 10, 10, 200, 100)
   cb.Style = $"-fx-font-size:17.00;-fx-border-color:#000000;
   -fx-border-radius:0.00;-fx-border-width:0.00;-fx-background-radius:0.00;
   "$
End Sub
Do you see the same error?
If yes then try to remove parts of the CSS string until the error disappears.
 
Hi Erel,
if I remove -fx-background-radius:0.00;
there is the attached error, otherwhise I see the combobox
 

Attachments

That's useful. Another thing that I would like you to try:
Code: Copy
Sub AppStart (Form1 As Form, Args() As String)
   MainForm = Form1
   MainForm.SetFormStyle("UNIFIED")
   MainForm.Show
   Dim cb As ComboBox
   cb.Initialize("")
   MainForm.RootPane.AddNode(cb, 10, 10, 200, 100)
   cb.Style = $"-fx-font-size:17.00;-fx-border-color:#000000;
   -fx-border-radius:0.00;-fx-border-width:0.00;-fx-background-radius:20.00;
   "$
   cb.Items.AddAll(Array ("Item 1", "Item 2"))
End Sub
If it works then try to comment the last line and test again.
 
Back
Top