Hello,
I am using the HTTP library to perform a Get. My code is derived from the TablesExample1.
After receiving the ResponseSuccess, I would like to set a flag or fire a signal saying the data is received rather than continuing on within this subroutine.
I tried a flag and a while-doevents loop in my main code, but this does not allow the HTTP ResponseSuccess Sub to execute.
I found the following in the Beginners Guide:
"DoEvents same, except that Erel says:
"Calling DoEvents in a loop consumes a lot of resources and it doesn't allow the system to process all waiting messages properly."
I will bet this is the problem. I have used the flag, while-doevents construct in the past for timers.
My question: Are there synchronization or signaling capabilities in B4A? I cannot find any in the documentation.
I would like to have my main routine notified that valid data has been received (or an error occurred) and continue in main from there, rather than continuing a very lengthy calculation from the ResponseSuccess Sub. What is the best way to accomplish this?
Thanks,
Barry.
I am using the HTTP library to perform a Get. My code is derived from the TablesExample1.
After receiving the ResponseSuccess, I would like to set a flag or fire a signal saying the data is received rather than continuing on within this subroutine.
I tried a flag and a while-doevents loop in my main code, but this does not allow the HTTP ResponseSuccess Sub to execute.
I found the following in the Beginners Guide:
"DoEvents same, except that Erel says:
"Calling DoEvents in a loop consumes a lot of resources and it doesn't allow the system to process all waiting messages properly."
I will bet this is the problem. I have used the flag, while-doevents construct in the past for timers.
My question: Are there synchronization or signaling capabilities in B4A? I cannot find any in the documentation.
I would like to have my main routine notified that valid data has been received (or an error occurred) and continue in main from there, rather than continuing a very lengthy calculation from the ResponseSuccess Sub. What is the best way to accomplish this?
Thanks,
Barry.