Hi. I have a class module creating buttons on a panel and a click event. From this I want to pass a property from the class to an outside module in Main. The sub in Main runs when button clicked BUT variable is empty. I tried different approaches but sent variable is always EMPTY. Can't figure out how to do from forum.
Class module
Code in Main
What is the way to call ? How is variables handled?
Any help appreciated
Class module
B4X:
Sub button_Click
Log($"You clicked button ${mName}"$)
Log(mBtn_no)
Log(mTAG)' Shows correct value
Main.Last_tag = mTAG' Last_tag Public declared in Main
'######################### SEND RF CODE #######################################################
CallSub2(Main, "sendRF",Main.Last_tag )' EMPTY
' CallSub2(Main, "sendRF",mTag )' EMPTY
' CallSubDelay2(Main, "sendRF",Main.Last_tag )' EMPTY
' CallSubDelay2(Main, "sendRF",mTag )' EMPTY
End Sub
Code in Main
B4X:
Sub sendRF(tmpval As String)
Log(tmpval)' EMPTY !
...............
End Sub
What is the way to call ? How is variables handled?
Any help appreciated