Calling static module
Variables have to be declared in Process_Globals for them to be available to other modules.
You are right in using "main." (when accessing Process_Globals from main) to prefix the name.
Thank you For your answer. I did like you show me.
Now i have a compile error on line calling module, please could you help me where i made an error :
Thank you !!!
ToggleBoutons: activity Main
Sub Process_Globals
Dim ToggleBoutonHaut As ToggleButton
Dim ToggleBoutonFin As ToggleButton
Dim Label06 As Label
Dim Fin As String
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("ToggleBoutons")
Fin=""
Do While Fin=""
24 ModuleToggle.TestBouton
DoEvents
Loop
Activity.Finish
End Sub
ModuleToggle: (static module)
Sub TestBouton
If Main.Toggleboutonhaut.Checked=True Then Main.Label06.TEXT="HAUT"
If Main.Toggleboutonhaut.Checked=False Then Main.Label06.TEXT=" "
If main.ToggleboutonFin.Checked=True Then Main.Fin="O"
End Sub
Compiling code. Error
Error compiling program.
Error description: Unknown member: testbouton
Occurred on line: 24
ModuleToggle.TestBouton
Word: testbouton