Is there a way I can make Xojo pause for a few seconds during code execution? A client can’t believe that the code can do three things in succession so quickly, and I want to put a series of messages on the screen saying, ‘Doing X’, ‘Doing Y’, ‘Doing Z’ with a few seconds pause between each one so the client can ‘see’ the work being done.
Thanks
Steve
Presumably you could put up a dialog box which the user has to dismiss to proceed.
Just show a log with date/time at real time. No need to something blinking unreadable, or delays so your user can observe all the logged evolution until dismissing it.
2024-10-12 09:47:01 : doing X
2024-10-12 09:47:02 : X done
2024-10-12 09:47:03 : doing Y
2024-10-12 09:47:03 : Y done
But if you want to fake slowness, launch every step at end of the previous step using a Timer.CallLater after 2 seconds for example.
System.DebugLog can’t help here ?
It returns the date time of the operation and the passed string.
And… the Client can’t see the software final result ?
(strange)
User UI, not debugging.
Yes, but, it report by itself the date and time and what you ask it to write, so, basically, what you wrote.
Users don’t see debug logs
Yes Rick. But at 70, I am too old to play that game. If an user do not believe in what I say, I show Him / Her.
No later than earlier this afternoon, I proved to myself that sometimes I am an idiot: I passed a Row number instead of a Column number and was saying “This is a bug !” (in Xojo, where, clearly, the bug was mine and was haunting me for… two days, I think.)
Sorry to bother you with that.
I wish you the best. Just it.
If your code is executing things all in the same thread, your UI will not update in time to show each of the three things unless you use a MessageBox which halts execution until the user clicks OK. Otherwise all three actions will execute before the UI is redrawn with the status messages.
If you want to update the UI and display each status update in a listbox or on a label in realtime, you’ll need to segment the different portions of your code using Timers or Threads.