Why? (Note the two comments, "Works" and "Does not work")
And how will I ever remember this? ?
Log:
Waiting for debugger to connect...
Program started.
Something started
Something ended
Ciao
Calling RoutineEndsHere...
And how will I ever remember this? ?
Main:
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
clsMyClass:
Sub Class_Globals
End Sub
Public Sub Initialize
End Sub
Public Sub Routine(Text As String)
Log(Text)
Wait For RoutineEndsHere
End Sub
Log:
Waiting for debugger to connect...
Program started.
Something started
Something ended
Ciao
Calling RoutineEndsHere...
Last edited: