Roberto P. Well-Known Member Licensed User Longtime User Oct 10, 2016 #1 there is a way to call a function that works asynchronously from a procedure to carry out a long process without it being slowed? For example: during the processing of a number of elements (30000), I need to update the GUI to view the processing status. I tried to use DoEvents, but do not solve the problem. I hope it is clear. thank you
there is a way to call a function that works asynchronously from a procedure to carry out a long process without it being slowed? For example: during the processing of a number of elements (30000), I need to update the GUI to view the processing status. I tried to use DoEvents, but do not solve the problem. I hope it is clear. thank you
Roberto P. Well-Known Member Licensed User Longtime User Oct 11, 2016 #2 CallSubDelayed is queued messages, then it is called at the end of the process and not good. thanks Upvote 0
LucaMs Expert Licensed User Longtime User Oct 11, 2016 #3 Roberto P. said: I hope it is clear. Click to expand... Per me sarebbe molto più chiaro in italiano Più che asincrono mi sembra che ti serva sincrono, ovvero che possa andare in esecuzione mentre è in esecuzione il loop. DoEvents dovrebbe funzionare; premetti un Activity.Invalidate oppure un Invalidate sulla View che devi aggiornare. Try using the Invalidate method of the Activity or of the View you need to update, before DoEvents. Upvote 0
Roberto P. said: I hope it is clear. Click to expand... Per me sarebbe molto più chiaro in italiano Più che asincrono mi sembra che ti serva sincrono, ovvero che possa andare in esecuzione mentre è in esecuzione il loop. DoEvents dovrebbe funzionare; premetti un Activity.Invalidate oppure un Invalidate sulla View che devi aggiornare. Try using the Invalidate method of the Activity or of the View you need to update, before DoEvents.
Informatix Expert Licensed User Longtime User Oct 11, 2016 #4 Roberto P. said: there is a way to call a function that works asynchronously from a procedure to carry out a long process without it being slowed? For example: during the processing of a number of elements (30000), I need to update the GUI to view the processing status. I tried to use DoEvents, but do not solve the problem. I hope it is clear. thank you Click to expand... You have two solutions: using the Threading library or the CallSubExtended library of ProBundle (much easier). Upvote 0
Roberto P. said: there is a way to call a function that works asynchronously from a procedure to carry out a long process without it being slowed? For example: during the processing of a number of elements (30000), I need to update the GUI to view the processing status. I tried to use DoEvents, but do not solve the problem. I hope it is clear. thank you Click to expand... You have two solutions: using the Threading library or the CallSubExtended library of ProBundle (much easier).
Erel B4X founder Staff member Licensed User Longtime User Oct 13, 2016 #5 You can use CallSubDelayed for this. Split the task to several smaller tasks and call the next one each time with CallSubDelayed (after you update the progress). Upvote 0
You can use CallSubDelayed for this. Split the task to several smaller tasks and call the next one each time with CallSubDelayed (after you update the progress).
Roberto P. Well-Known Member Licensed User Longtime User Oct 13, 2016 #6 Try the various options. Thank you all Upvote 0