B4A Class [B4X] CallSubPlus - CallSub with explicit delay - Erel    
Nov 30, 2015   
(26 reactions) it much simpler. You just need to call CallSubPlus with the target sub and the delay.
Internally it uses a (one shot) timer together with CallSubDelayed or CallSub.
There are four methods:
CallSubPlus, CallSubPlus2, CallSubDelayedPlus and CallSubDelayedPlus2.
CallSubPlus and CallSubDelayedPlus...($"Click: $Time{DateTime.Now}"$)
Starter.csu.CallSubPlus(Me, "Sub_1", 2000) 'run in two seconds
Starter.csu.CallSubPlus2(Me, "Sub_2", 1000, Array("Value 1"...
Bug? CallSub2 crash in debug mode - Alessandro71    
Jul 22, 2026 As DoIPMessage)
...
CallSub2(Me, "Routing_Complete", True)
...
End Sub
when i run the project, it crashes with the following error (line 219 is the CallSub2(Me, "Routing_Complete"...
link: I recommend using CallSubDelayed for events in all platforms. With CallSub, the Wait For statement...
link: -around "code smell"?
because i expect CallSub to execute the called Sub immediately, while...
link: Does it work with CallSubDelayed? It is safer to call "Wait For events"...
B4A Question [B4X] Resumable Sub, CustomClass Eventi and CallSub - Star-Dust    
Mar 3, 2021Could an event called by a class be a sub Resumable?
For example
Sub Class_Event as ResumableSub
Return True
End Sub
And could the class invoke the event and wait for completion?
Something like this
'Call Event
If SubExist(mCallBack,MEvent & "_Event") then
Wait for (CallSub(mCallBack,MEvent & "_Event")) Complete (Success As Boolean)
End If...
B4J Question b4j.CallSub problem - jkhazraji    
Oct 6, 2023 msg ='Hello world '+count;
b4j.CallSub('show_msg', msg...
import java.lang.reflect.Method;
public static class Bridge{
public static void CallSub(String...
link: ), but it works in a class, and without having to use reflection for the subs callback.
That was really concise...
link:
public Object callSub(String sub) { // for call with no parameters
return ba.raiseEvent2...
link: Your code is correct. You need Java 14 to run it and this part of your code needs to be changed to m...
B4A Code Snippet [XUI][Custom Views] Create Event Name for CallSub - LWGShane    
Dec 22, 2022   
(3 reactions)Just a simple method that makes creating event names for CallSub easier. Useful for Custom Views.
Method:
Private Sub CreateEventName (SubName As String) As String
Return $"${mEventName}_${SubName}"$
End Sub
To use:
CallSub(mCallBack, CreateEventName("YourEvent"))
...
Wish Unlimited number of arguments when using CallSub/CallSubDelayed - LucaMs    
Jul 1, 2019)
I don't know if creating a CallSubDelayed4 (and CallSub4) that allows you to send... within the Activity itself, I simply use: RoutineName(Param1, Param2).
I also called it from a service module and also using CallSubDelayed again from within the Activity.
I needed to modify that routine by adding a third parameter but CallSubDelayed3 can be used to pass two arguments only, as you know...
Italian CallSub e CallSub2 - Fulvio75    
May 23, 2023 CallSub(B,"NomeSub") quando compila mi da errore, se invece utilizzo CallSub per chiamare...?
CallSub(b,\
shell\src\xxx\software\gau\a_subs_0.java:513: error: cannot find symbol
a.__c.runMethodAndSync(false,"CallSubNew",__ref.getField(false, "ba"),(Object)((a._b.getObject...
link: Grazie...
link:
Non si può chiamare una sub da classe a modulo semplice?
https://www.b4x.com/android/forum...
B4J Question unable to initialize objects by CallSub - Alessandro71    
Sep 11, 2024 CallSub
here is a minimal proof-of-concept (useless) code
Sub AppStart (Args() As String)
Dim o1... As Object In a
CallSub(o, "Initialize")
Next
End Sub
This code throws....NullPointerException
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:522)
at anywheresoftware...
link: ,Array(Null))
#end if
Next
My full working code (Class1 is just a bare class)
Sub...
link: a reference which until (B4X) initialize or (java) new is called, it is null....
Other New feature: CallSub AutoComplete - Erel    
May 24, 2018   
(20 reactions)68252...
Italian Chiamata CallSub2 - Fulvio75    
Nov 30, 2023Ciao, ho un problema con il CallSub2 durante la compilazione che va in errore perchè?
ModuloA è un... la sub chiamata deve interpretare
CallSub2(ModuloA,"Get_" & Codice & "_...
link:
non dicevi sul serio, vero?
ci sono pagine di un thread per far funzionare una cosa convoluta e non...
link:
E' anche più ordinato (Lucas)
non dicevi sul serio, vero?
ci sono pagine di un thread per far ...
link:
No, eh? Mi sono illuso ?
? queste chat mi piacciono??...
Page: 1  
2  
3  
4  
5  
6