Sub Process_Globals
Private MainForm As Form
Private Button1 As B4XView
Private mMyClass As clsMyClass
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1")
MainForm.Show
mMyClass.Initialize
Something
CallSubDelayed(Me, "SomethingEndsHere") ' Works
End Sub
Sub Button1_Click
mMyClass.Routine("Ciao")
Log("Calling RoutineEndsHere...")
CallSubDelayed(mMyClass, "RoutineEndsHere") ' Does not work
End Sub
Private Sub Something
Log("Something started")
Wait For SomethingEndsHere
Log("Something ended")
End Sub