LucaMs Expert Licensed User Longtime User Jul 28, 2017 #1 Is there a way to remove DoEvents from StateManager Class?
somed3v3loper Well-Known Member Licensed User Longtime User Jul 28, 2017 #2 Replace DoEvents with sleep(0) ? Upvote 0
LucaMs Expert Licensed User Longtime User Jul 28, 2017 #3 somed3v3loper said: Replace DoEvents with sleep(0) ? Click to expand... 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 think that you should never replace DoEvents with Sleep(0) if it is inside a recursive routine; am I wrong? 2) what happen if it is called by a public method... [second situation described above]? Last edited: Jul 29, 2017 Upvote 0
somed3v3loper said: Replace DoEvents with sleep(0) ? Click to expand... 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 think that you should never replace DoEvents with Sleep(0) if it is inside a recursive routine; am I wrong? 2) what happen if it is called by a public method... [second situation described above]?
M mw71 Well-Known Member Licensed User Longtime User Jul 28, 2017 #4 Hello, I've replaced DoEvents with Sleep (with Replace all ....), and get problems. (I do not remember exactly what, but I think the app has crashed), so I've been replacing the Sleep(0) back to DoEvents. Upvote 0
Hello, I've replaced DoEvents with Sleep (with Replace all ....), and get problems. (I do not remember exactly what, but I think the app has crashed), so I've been replacing the Sleep(0) back to DoEvents.
Erel B4X founder Staff member Licensed User Longtime User Jul 30, 2017 #5 Replace: Code: sv.ScrollPosition = data(0) DoEvents sv.ScrollPosition = data(0) With: Code: sv.ScrollToNow(data(0)) Upvote 0
Replace: Code: sv.ScrollPosition = data(0) DoEvents sv.ScrollPosition = data(0) With: Code: sv.ScrollToNow(data(0))