Because I cannot pass a variable to an Event...
I have tried the following and failed. Sub exited doing nothing.
The I used a variable and it worked, can somebody say why please. [EDIT] Debugging shows that the tag has the correct value.
I have tried the following and failed. Sub exited doing nothing.
B4X:
Elsewhere
bFlag=True
btnEOK.Tag=bFlag
Sub btnEOK_click
If btnEOK.tag=False Then
Log("Data Saved")
Else If btnEOK.tag=True Then 'I tried just else, and it 'appeared' to work
Log("Closed") 'until I added the =True to prove it
End If
End Sub
The I used a variable and it worked, can somebody say why please. [EDIT] Debugging shows that the tag has the correct value.
B4X:
Sub btnEOK_click
Dim b as boolean
b=btnEOK.Tag
If b=False Then
Log("Data Saved")
Else If b Then
Log("Closed")
End If
End Sub
Last edited: