I am using a LOOP to process lines in a CSV file and add in the records it parses.
The code works correctly and all the records are processed. However I noticed that if the app loses focus (say for example I switch over to DebugView++ to watch the debug messages), then the Clarion app stops updating its display window and Windows Task Manager reports the app as “not responding”. But it is still running and executing the loop.
I’m used to similar behavior in MS Access 97 and it is easily solved by the introduction of a DoEvents call somewhere in the loop. I have tried the SLEEP(1) command, since I can’t find an equivalent of the DoEvents method. SLEEP just adds (one) millisecond to each iteration of the loop, but doesn’t help the app to update the display. So I abandoned that idea. There are 77,000 records in one file, and 147,000 rows in another file.
Before the LOOP commences I open a WINDOW and use DISPLAY(?Count) to update a counter in the window. Once the app loses focus, the window is greyed out and doesn’t update until the loop finishes. How do I enable my Clarion app to update the window while it processes the loop?