I am writing code to perform a curl GET HTML request to get data from a key/value database.
I'm using a dictionary to store the key/values, and cycling through each key using a for each loop.
The issue is that even when I try to wait for a web response, only the last key in the dictionary get populated with data. Not sure how to insert a delay and recheck inside the loop, or if that even works based on how MIT multi-threading works. Wondering if anyone knows of a workaround are possible implementation that will wait to perform the next loop iteration until after the "web.GotText" response has been completed.
Thanks ABG.. New to the MIT construct (loops, threads, delays are more my world). Can you point me in the right direction for how to implement a "work queue"? How to start, process, complete, reiterate.. within the MIT App construct?
Ahh.. Ok.. I think I see the key idea here. You iterate using a global counter, and call the subsequent "GET" requests in the GOTTEXT event. Makes sense. I'll give it a go.