B4J Question [SOLVED]Problem with Scene Builder

Similar threads

B4J Question [ABMaterial} ABMcombo in NavigationBar
B4J Question Filling In The ComboBox
B4J Question [ABMaterial] combo null
B4J Question Help for B4J Code
B4J Question [AB Material] Issue

Giacomo

Member
Licensed User
Hello
I'm trying to insert a ComboBox (or a label) ,with SceneBuilder, into my application ( in TAB Config XL/ XLLAS ) the control doesn't work
My application:
'Static code module
Sub Process_Globals
    Private fx As JFX
    Private Combo1 As ComboBox
    Private LBL1 As Label
End Sub
Sub Tab_Config_Start
    'LBL1.Initialize("")
    
    LBL1.Text="Non scrive nulla"
    Combo1.Initialize("")
    Combo1.Enabled=True
    Combo1.Id="Combo1"
    Combo1.Items.Add("Tutti")
    Dim Lista_Combo As List
    Lista_Combo.Initialize
    Lista_Combo.Add("Tutti")
    Lista_Combo.Add("Corrette")
    Lista_Combo.Add("Errate")
    Combo1.Items.AddAll(Lista_Combo)
    Combo1.SelectedIndex=0
        
    'Main.Combo_Config_01.Items.AddAll(Lista_Combo)
    Log(" Dimensione combo " &Combo1.Items.Size)
End Sub

Sub Combo1_ValueChanged (Value As Object)
    
End Sub

Sub Combo1_SelectedIndexChanged(Index As Int, Value As Object)
    Log("index " & Index & " Valore " & Value)
End Sub
If instead I create a new simple application, everything works

This Work:
#Region Project Attributes
    #MainFormWidth: 600
    #MainFormHeight: 600
#End Region

Sub Process_Globals
    Private fx As JFX
    Private MainForm As Form
    Private Combo1 As ComboBox
End Sub

Sub AppStart (Form1 As Form, Args() As String)
    MainForm = Form1
    MainForm.RootPane.LoadLayout("Prova_combo.fxml") 'Load the layout file.
    MainForm.Show
    Dim Lista_Combo As List
    Lista_Combo.Initialize
    Lista_Combo.Add("Tutti")
    Lista_Combo.Add("Corrette")
    Lista_Combo.Add("Errate")
    Log(Combo1.Id)
    Combo1.Items.AddAll(Lista_Combo)
    Combo1.SelectedIndex=0
End Sub

'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
    Return True
End Sub
I noticed that the inserted controls do not have ID that I entered on sceneBuilder
in fact, it requests initialization also for the labels inserted with SceneBuilder

I attach my application.
I commented on all the lines that read the DB
 

Attachments

stevel05

Expert
Licensed User
I take it this is an old project, as Scene builder was deprecated for B4j 4 or so years ago. I suspect that you will need to convert the layout to use the internal designer, it's well worth it.
 

Giacomo

Member
Licensed User
I take it this is an old project, as Scene builder was deprecated for B4j 4 or so years ago. I suspect that you will need to convert the layout to use the internal designer, it's well worth it.
The project is new
I have many difficulties with the internal designer
Scene Builder works correctly in my applications

I have the problem only on this
I probably did something wrong
 

stevel05

Expert
Licensed User
I have many difficulties with the internal designer
With respect, I would suggest that you give it another go. Watch the available videos and read the guide booklets. it won't take that long.

I don't think you will get support for Scene Builder, I doubt many have it still installed.
 
Top