I have a theoretical question. I use B4XPages. I can call sub between the pages directly. Is there any difference between this and calling CallSubDelayed?
Page3.ClearImage
or
CallSubDelayed(Page3, "ClearImage")
Calling the Sub directly executes the called Sub immediately before returning to complete the rest of code in the calling Sub. CallSubDelayed posts the call to the apps message loop and so the Sub will only be called when the calling Sub, and any others in the call chain, all complete and execution returns to the message loop which will then call the delayed Sub.
There is another big difference: you can call a function (Sub) directly, that is, get a return value, but you cannot do that with CallSubDelayed (or, better, you can execute the call but not receive the result).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.