Hello
I have a class that contain functions
Each function have argument (module and event)
And return result according to function usage
Example:
B4X:
Sub Number2Word(Module As Object,Event as String,Number As Int)
If Number = 1 Then
CallSubDelay2(Module,Event,"One")
Else If Number = 2 Then
CallSubDelay2(Module,Event,"Two")
End if
End Sub
And call this function with below code
B4X:
Sub Page1_Resize(Width As Int,Height As int)
Dim fu As Convert
fu.Initialize
fu.Number2Word(Me,"Result_Convert",1)
End Sub
Sub Result_Convert(Res As String)
log(res)
End Sub
In mention code,when i call Number2Word,it does not raise Result_Convert
I try to check why didn't raised and i understood Module argument is null
No. It is fine. You can create local class instances as long as you don't need the class instance to be kept alive.
It was just a guess as there isn't enough information here to say anything.
No. It is fine. You can create local class instances as long as you don't need the class instance to be kept alive.
It was just a guess as there isn't enough information here to say anything.