Wish msgbox crashes - please disabile it - agraham (first post)    Nov 02, 2023   (4 reactions) DoeEvents is not synonymous with Sleep(0). They have different behaviour. DoEvents is synchronous and pumps the message loop before proceeding with the following code. Sleep(0) is asynchronous and returns from the Sub to the message loop immediately and the following code is scheduled to run at a la B4A Tutorial DoEvents deprecated and async dialogs (msgbox) - Erel    May 28, 2017   (26 reactions) Starting from B4A v7.0 the following warning will appear for DoEvents calls:
DoEvents is deprecated. It can lead to stability issues. Use Sleep(0) instead (if really needed).
The purpose of DoEvents was to allow the UI to be updated while the main thread is busy. DoEvents which shares the same impl Wish New Sleep feature - Erel (first post)    Apr 03, 2017   (3 reactions) DoEvents is the opposite of the new sleep feature. It holds the main thread in a loop (while processing the message loop). The new sleep feature is much more sophisticated and it doesn't hold the main thread. It instead stores the current context and later resumes it. Anyway, As DonManfred wrote th B4A Question Screen not updating during process - sorex (first post)    Jan 08, 2015   (1 reaction) we are talking about a wait loop here, in this case it's bad.
in other cases like filling a large select list the doevents is a solution to prevent "app not responding" notifications.
but in general wait loops are to be avoided when you have timers available. Spanish [SOLUCINADO] Crear rutina comun para conexion JSON - Jorge M A (first post)    Feb 24, 2020   (3 reactions) https://www.b4x..png DoEvents DoEvents is deprecated. It can lead to stability issues. Consider using Sleep(0) instead. B4A Question failure to verify dex file ... has code, but is marked as native or abstract - majin (first post)    Jul 12, 2022 (warning #10) GenerateForms - 4071: DoEvents is deprecated. It can lead to stability issues. Use Sleep(0) instead (if really needed). (warning #33) GenerateForms - 4073: DoEvents is deprecated. It can lead to stability issues. Use Sleep(0) instead (if really needed). (warning #33) GenerateForms - 41 B4A Question Layout is taking time to show - Mahares (first post)    Jan 10, 2015   (2 reactions) You should try the DoEvents and see what happens.
DoEvents
Processes waiting messages in the messages queue.
DoEvents can be called inside lengthy loops to allow the program to update its UI. B4J Question DoEvents alternative - Erel (first post)    Nov 28, 2021 First step is to check the actual task and see whether it can be optimized or be done asynchronously.
Please post the relevant code. B4A Question Sleep Pause Wait System Timer - blong (first post)    Sep 12, 2015 As in another post .... DoEvents is a no-no in Android 4.4 ! It causes app to behave erratically as processes start/end at non-user controlled times. Avoid at all cost ... use Tick event. B4A Question StateManager Class - DoEvents - LucaMs (first post)    Jul 29, 2017   (1 reaction) I'm not so sure.
That DoEvents is inside of innerRestoreState routine, which is a recursive routine (it calls itself).
It is also called by a public method, RestoreState, and we cannot know how the user-developer will call this routine (he could call it at bottom of a "calling chain")
So:
1) I t Page: 1   2   3   4   5   6   7   Powered by ColBERT |