Look to the code below:
If you press cancel everything is ok.
If you press OK with a text.lenght <5 the input dialog is shown again as expected. But if after this you press cancel again, you see "completed".
What's wrong in my code ?
If you press cancel everything is ok.
If you press OK with a text.lenght <5 the input dialog is shown again as expected. But if after this you press cancel again, you see "completed".
What's wrong in my code ?
B4X:
Sub Button1_Click
Dim id As InputDialog
id.Show("Inserirt name","Test","Ok","Cancel","",Null)
If id.Response=DialogResponse.CANCEL Then
Return
End If
Dim a As String=id.Input
Log("text lenght=" & a.Length)
If a.Length<5 Or a.Length>40 Then Button1_Click
Log("completed")
End Sub