Android Question Name Sub in CallSub2

Sergey_New

Well-Known Member
Licensed User
Longtime User
I need to execute in Activity from a subroutine:
CallSub2(CallBack,"delChild",id)
Everything works correctly.
But if delChild is passed through a variable:
Private SubObj As String="delChild"
CallSub2(CallBack,SubObj ,id)

logs:
Sub 'delChild' is not used. (warning #12)
How do I correctly pass the name of the Sub?
 
Solution
If it works, then you can ignore the warning by adding comment 'ignore as shown
B4X:
Sub delChild(id as int) 'ignore
Top