Hi folks.
I have run into an issue that is making me frustrated.
I’m running Xojo 2025R2 on mac Sonoma.
I have a thread that will update on a window a label, so people can see the program is running, even if it isn’t showing anything.
here is the code for threadForRunningTime.Run
static runTimerValue As Integer
While app.runningTime = TRUE
runTimerValue = runTimerValue + 1
Me.AddUserInterfaceUpdate("timeCounter":runTimerValue)
Thread.SleepCurrent(1000)
Wend
And in my threadForRunningTime.UserInterfaceUpdate:
Var seconds As Integer
If data.LastIndex >= 0 Then
Var arg As Dictionary = data(data.LastIndex)
If arg.HasKey("timeCounter") Then
seconds = arg.Value("timeCounter").IntegerValue
labelProgramRunTime.Text = seconds.ToString
End If
End If
The issue I have is that instead of getting 1..2..3.. it screams up to tens of thousands. And just stops.
Or locks up my program and xojo.
If I remove the Me.AddUserInterface… it seems to act normally according to my log file.
7:12:19 PM : There are 45 total rows
7:12:21 PM : ******** MATCH FOUND ********
: I = 4 J = 6
: ******** MATCH FOUND ********
: I = 4 J = 18
: ******** MATCH FOUND ********
: I = 4 J = 20
7:12:22 PM : ******** MATCH FOUND ********
: I = 6 J = 18
: ******** MATCH FOUND ********
: I = 6 J = 20
7:12:23 PM : ******** MATCH FOUND ********
: I = 9 J = 16
: ******** MATCH FOUND ********
: I = 9 J = 19
: ******** MATCH FOUND ********
: I = 9 J = 23
7:12:24 PM : ******** MATCH FOUND ********
: I = 11 J = 12
7:12:25 PM : ******** MATCH FOUND ********
: I = 13 J = 37
: ******** MATCH FOUND ********
: I = 14 J = 22
7:12:26 PM : ******** MATCH FOUND ********
: I = 15 J = 43
: ******** MATCH FOUND ********
: I = 16 J = 19
: ******** MATCH FOUND ********
: I = 16 J = 23
: ******** MATCH FOUND ********
: I = 17 J = 21
: ******** MATCH FOUND ********
: I = 18 J = 20
7:12:27 PM : ******** MATCH FOUND ********
: I = 19 J = 23
7:12:28 PM : ******** MATCH FOUND ********
: I = 24 J = 31
7:12:29 PM : ******** MATCH FOUND ********
: I = 26 J = 27
: ******** MATCH FOUND ********
: I = 28 J = 33
7:12:32 PM : Done and Dusted
: ABOUT TO STOP RUNNING TIME
: RUNNING TIME IS NOW: False
7:1
Any ideas?
Regards