B4J Question MenuBar and Class Module (Standard Class)

Gianni M

Well-Known Member
Licensed User
Longtime User
usually we have a MenuBar (AS myMenu) and a code like
Code: Copy
'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
question:
can use a unique
Code: Copy
 Dim mdJ as ?????
and after continue with
Code: Copy
mdj.Inizialize (.......)
CallSubDelayes3 (mdJ , "Show", pMenu, abc)
or how to possible optimze ?
 
yes, i have many modules (examples customers, sales agents, sales orders, report, staticts, .....) each his layout and code
Maybe you need to have a single one that can be configured. This will make things simpler.
I don't understand; which approach to use ?
 
Upvote 0
Back
Top