B4A Question Select a class at runtime - agraham (first post)    Mar 09, 2022   (1 reaction) Yes but CallSub() is quite slow as, compared to a direct call, it has to look up the method to call in a hashtable and invoke it by reflection. It's not a huge overhead, particularly if the called Sub does significant processing, but if called repeatedly for a trivial Sub, say in a loop, it could im B4J Tutorial [B4X] How Resumable Subs work - agraham (first post)    Jan 29, 2019   (5 reactions) It's nothing like the old Gosub! CallSub is probably the nearest equivalent to GoSub as with that you can do run-time determination of which Sub to call. This is a pause and resume capability that uses events raised on the message loop of the main thread to manage it. B4A Class [B4X] CallSubPlus - CallSub with explicit delay - Erel    Nov 30, 2015   (26 reactions) Notes
- Make sure to include an underscore in the target subs names if you intend to compile with obfuscation.
- CallSubDelayed will start the target service or activity if needed (see this tutorial for more information: https://www.b4x.-callsubdelayed-to-interact-between-activities-and-services.18 B4A Library UltimateWebView Custom View - Ivica Golubovic (first post)    Jan 08, 2022   (4 reactions) B4A.CallSub("", true)
'Or
B4A.CallSub("", true, "message1")
'Or
B4A.CallSub("", true, "message1", "message2")
'Or
B4A.CallSub("", true, "message1", "message2", "message3")
'Or
B4A.CallSub("", true, "message1", "message2", "message3", "message4")
'Or
var value1 = B4A.CallSub("", false,.....)
B4A.Sho Wish CallSub - free number of parameters - Erel (first post)    Jan 23, 2019   (2 reactions) Use an array or a map. It is very simple. B4A Question DoEvents needed? - OliverA (first post)    Apr 16, 2020   (1 reaction) Ok, I may display my ignorance here, but CallSubDelayed creates an event, CallSub is a direct call and would therefore not give your app a chance to process other events. Plus if it were an Event generator, the sub would never get called (and here it is) since the loop has nothing in it to allow the B4A Code Snippet [XUI][Custom Views] Create Event Name for CallSub - Erel (first post)    Dec 23, 2022   (1 reaction) Note that in most cases it is better to use CallSubDelayed instead of CallSub. B4A Question GPS_LocationChanged not executing after starting up the GPS - rleiman (first post)    Feb 26, 2018   (1 reaction) Got it working. :)
I called
CallSub(Starter, "StartGPS")
from the scheduled service module which was in the Starter service module. From the Starter module I did all of the processing from GPS_LocationChanged by first stopping the GPS so that event won't be called repeatedly. This all happened whe B4A Question B4A.Callsub (Webviewextras) and javascript (SOLVED) - bernardR    Jun 26, 2023 Hello,
Despite much research I did not understand the difference between true and false in the javascript command
B4A.CallSub('subInB4a', false, data);
and
B4A.CallSub('subInB4a', true, data);
Thank you so much B4A Library MteEval - B4X Expression Compiler and Eval Library (Open Source) - stanmiller (first post)    Feb 02, 2017 I've been trying to figure out a clever way not to use "callsub()" and the overhead it brings. But it looks like callsub is the only way possible to dynamically bind and call functions outside the lib. It won't be long for 1.08. A week or so... Page: 1   2   3   4   5   6   7   Powered by ColBERT |