ciao, stò provando a riscrivere un programma da vb6 in B4J. E come inizio non è molto incoraggiante. Cmq non riesco a far funzionare sto cavolo di menu.
nel MenuItem ho scritto:
nel main
Non capisco dove sbaglio. La Sub MenuBar1_Action non viene eseguita.
nel MenuItem ho scritto:
B4X:
[
{Text: "_SCHEDE", Children:[]},
{Text: "_MT.LINEA", Children:[] },
{Text: "_GESTIONE ETICHETTE", Children:
[
{Text: "CODICI BOBINE", Children:[], ventName:"CODICI BOBINE", tag: "SCHEDE" },
{Text: "STAMPA ETI.BOBINE",Children:[]}
]
},
{Text: "_ESCI", Children:[] }
]
nel main
B4X:
#Region Project Attributes
#MainFormWidth: 800
#MainFormHeight: 600
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("mio") 'Load the layout file.
MainForm.Show
End Sub
Sub MenuBar1_Action
Dim mi As MenuItem = Sender
Log(mi)
If mi.Text = "CODICI BOBINE" Then Log("SCHEDE")
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
Non capisco dove sbaglio. La Sub MenuBar1_Action non viene eseguita.