B4i Question Resumeable subs - need simple way - Star-Dust (first post)    Jun 02, 2021   (2 reactions) You can add parameters to this method if needed.
Public Sub ConnectToServer
AAA 'Resumable Sub1
End Sub
Sub AAA
Wait For (GetIDs (ID1, user, psw)) Complete (result1 As List)
'code...
BBB 'Resumable Sub2
End Sub
Sub BBB
Wait For (GetIDs (ID2, user, psw)) Complete (result2As List B4A Question Wait a Javascript value - DonManfred (first post)    Jun 30, 2022   (2 reactions) Inform about Resumeable subs and how to use a specific return type.
You are not using it right.
https://www.b4x.com/android/forum/threads/b4x-resumable-subs-that-return-values-resumablesub.82670/ B4A Question Multiple click on Item in CLV - Andrew (Digitwell) (first post)    Mar 02, 2022   (2 reactions) Ok,
if the database read or other operations use resumeable subs you need to use wait for or the processing will continue at this level.
see this thread which may help explain:
https://www.b4x.-subs-order-of-execution.131188/
and
https://www.b4x.com/android/forum/threads/b4x-resumable-subs-that-ret B4J Tutorial [B4X] How Resumable Subs work - agraham    Jan 30, 2019   (27 reactions) Typically you might use the value of global variables to decide what needs to be done after the next event and call an appropriate Sub when an event occurs.
The Resumable Sub mechanism allows this "do, wait, then finish" to be conveniently expressed in a single Sub as sections of code separated by B4A Question Resumeable Sub Question [B4X] (SOLVED) - Sagenut (first post)    Feb 21, 2022   (2 reactions) Private Sub someevent
Log("1")
Wait For ButtonClicked(done As Boolean)
Log(done)
Log("3")
End Sub
Private Sub btn_Click
Log("2")
CallSubDelayed2(Me, "ButtonClicked", True)
End Sub
Try this B4A Library Wheel by B4A Class - derez (first post)    Apr 03, 2018   (3 reactions) Both vertical wheel and horizontal wheel were updated to use resumeable subs. B4A Question Faster Looping - DonManfred (first post)    Mar 08, 2021   (2 reactions) MAke your sub a resumeable sub and use "wait for" for it to finish. Use sleep in the sub to not freeze anything. B4A Question MQTT inline wait for code - DonManfred (first post)    Apr 23, 2024 because mqttclient_MessageArrived is not a resumeable sub. It is an Eventsub. Resumeable subs only have ONE Returnvalue. https://www.b4x.com/android/forum/threads/b4x-resumable-subs-that-return-values-resumablesub.82670/ B4A Question alternative to sleep ? - DonManfred (first post)    Jun 22, 2018   (1 reaction) I suggest to learn on how to use resumeable subs. https://www.b4x.com/android/forum/threads/b4x-resumable-subs-sleep-wait-for.78601/ B4A Question Wait for - DonManfred (first post)    Feb 05, 2020   (2 reactions) yes, make startscan a resumeable sub. https://www.b4x.com/android/forum/threads/b4x-resumable-subs-that-return-values-resumablesub.82670/ Page: 1   2   3   4   5   6   7   Powered by ColBERT |