usually we have a MenuBar (AS myMenu) and a code like
question:
can use a unique
and after continue with
or how to possible optimze ?
B4X:
'dim pMenu as Pane
Sub myMenu_Action
Dim mi As MenuItem = Sender
Dim tag As String
tag = mi.Tag
Select tag
Case "exit"
ExitApplication
Case "module1"
Dim md1 As jModule1
md1.Initialize (with or without param)
CallSubDelayed3(md1, "Show", pMenu, "Info1")
End If
Case "module2"
Dim md2 As jModule2
md2.Initialize (with or without param)
CallSubDelayed3(md2, "Show", pMenu, "jInfo2")
End If
Case "module...n"
'same of module1, module2, module3, and .......
End Select
End Sub
can use a unique
B4X:
Dim mdJ as ?????
B4X:
mdj.Inizialize (.......)
CallSubDelayes3 (mdJ , "Show", pMenu, abc)