Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("layMain")
DateTime.TimeFormat = "mm:ss:SSS"
End Sub
Sub Activity_Resume
For i = 1 To 3
LogWithTime("I : " & i, Colors.Red)
Show
Next
End Sub
Sub Show
For j = 98 To 100
LogWithTime("J : " & j, Colors.Blue)
Label1.Text = j
Wait(1000) ' here I wish wait for one second, with GUI refresh
Next
End Sub
' ******************************************************
' *** These two routines should do what "I" need.
' *** Putting them in a simple library, you could have
' *** a Wait command which does what I mean.
Public Sub Wait(Duration As Long)
LogWithTime("Sub Wait", Colors.Black)
WaitHelper(Duration)
Wait For WaitHelper_Completed
End Sub
Private Sub WaitHelper(Duration As Long)
LogWithTime("Sub WaitHelper", Colors.Black)
Sleep(Duration)
CallSubDelayed(Me, "WaitHelper_Completed")
End Sub
' ******************************************************
Sub LogWithTime(Text As String, Color As Int)
LogColor(DateTime.Time(DateTime.Now), Colors.Green)
LogColor(TAB & Text, Color)
End Sub