B4A Class [B4X] CallSubPlus - CallSub with explicit delay

swChef

Active Member
Licensed User
Longtime User
I had the "If rdd.Delayed Then" in tmr_Tick give an error. Checked this sub and found it wasn't Initialized
B4X:
Private Sub PlusImpl(Module As Object, SubName As String, Delay As Int, Arg() As Object, delayed As Boolean)
    If RunDelayed.IsInitialized = False Then RunDelayed.Initialize
    Dim tmr As Timer
    tmr.Initialize("tmr", Delay)
    Dim rdd As RunDelayedData
    rdd.Initialize ' added 2/18/2018 not initialized
    rdd.Module = Module
    rdd.SubName = SubName
    rdd.Arg = Arg
    rdd.delayed = delayed
    RunDelayed.Put(tmr, rdd)
    tmr.Enabled = True
End Sub
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…