Reflector.SetOnClickListener (sub As String) - has only one parameter sub As String. How to pass the name of module where the Sub is located ?
Now As I can see the Sub has to be in the same module where SetOnClickListener (sub As String) is called.
yes I used this approach, but wanted to know if it's possible to do the same directly with Reflector
B4X:
Dim r As Reflector
r.Target = a_AB_btn
r.SetOnClickListener("AB_btn_Click")
Private Sub AB_btn_Click(ViewTag As Object)
If SubExists (Module, ViewTag) Then
CallSub(Module, ViewTag)
End If
End Sub
No, but the upside is there are times that you may want to pre-process the data or do something else such as hiding a view, before passing it to the module that calls it.