I am trying to use btn.tag tagged to swiftbuttons on positive response from an input template but getting following error
My code is as follows. What am I doing wrong?:
My code is as follows. What am I doing wrong?:
B4X:
Sub btnselect_Click
InputTemplate.lblTitle.Text = "Enter time (HH:MM)"
InputTemplate.RegexPattern = "^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$"
Wait For (Dialog.ShowTemplate(InputTemplate, "OK", "", "CANCEL")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
Dim btn As SwiftButton
btn=Sender
Select btn.Tag
Case "atd"
btn.xlbl.Text = InputTemplate.Text
lblatd.SetVisibleAnimated(1000,True)
Case "medaypic"
btn.xlbl.Text = InputTemplate.Text
lblmedaypic.SetVisibleAnimated(1000,True)
End Select
End If
End Sub