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
B4X:
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?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
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
 

GiulioVale

Active Member
Licensed User
Longtime User
Libraries versions are correct

full error message is attached

thanks
 

Attachments

  • error.txt
    73.1 KB · Views: 259

GiulioVale

Active Member
Licensed User
Longtime User
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
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Please try the following code:
B4X:
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.
 

GiulioVale

Active Member
Licensed User
Longtime User
Hi Erel,
if I remove -fx-background-radius:0.00;
there is the attached error, otherwhise I see the combobox
 

Attachments

  • error1.txt
    72.4 KB · Views: 256

Erel

B4X founder
Staff member
Licensed User
Longtime User
That's useful. Another thing that I would like you to try:
B4X:
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.
 

GiulioVale

Active Member
Licensed User
Longtime User
Erel for now in my project with:
B4X:
combo1.Style = $"-fx-background-radius:0.00;"$
solve the problem
 

GiulioVale

Active Member
Licensed User
Longtime User
You are in right my jre is 1.8 my jdk is 1.7. Now there is no problem with jdk 1.8.
Thanks
 
Top