B4X:
[CODE=b4x]Public Sub MySub ' In Another Component
Sleep(1000)
CallSub3(Sender, "MySub_Complete", True, Null)
End Sub
Public Sub MySub2 ' In Current Component
Dim SenderObject As Object = MySub
Wait For (SenderObject) MySub_Complete (Success As Boolean, Result As Object)
Log(Success)
End Sub
Public Sub MySub2
'Avoid MySub
'Avoid Wait For MySub_Complete(Success As Boolean, Result As Object)
Wait For (MySub) Complete (Success As Boolean, Result As Object)
End Sub[/CODE]
I want to avoid using callsub, but i dont know how to return more than one parameters as the example above!
Or something like this:
B4X:
Dim SenderFilter As Object = SQL_.ExecQueryAsync("SQL", QueryString, Args)
Wait For (SenderFilter) SQL_QueryComplete (Success As Boolean, Rs As ResultSet)
How SQL_.ExecQueryAsync Returns the two values without using component value that callsub needs?
This doesnt work even not fails:
B4X:
Public Sub MySubInAnotherComponent
Sleep(1000)
CallSub3(Sender, "MySubInAnotherComponent_Complete", True, Null)
End Sub
Public Sub MyCurrentSub
Dim SenderObject As Object = MySubInAnotherComponent
Wait For (SenderObject) MySubInAnotherComponent_Complete (Success As Boolean, Result As Object)
Log(Success)
End Sub
Last edited: