Hi everyone, please check the attached code.
While the focus is still inside EditText1, I tap SwiftButton1 (or an ordinary Button1).
I expect the order to be:
1 → LostFocusTest → 3a (save).
But what really happens is:
1 → 3a (save) → LostFocusTest,
so 3a ends up saving the old, un-processed value.
The same thing occurs with Button1.
Did I miss something, or is this the normal behavior?
Any help would be appreciated—thanks!
While the focus is still inside EditText1, I tap SwiftButton1 (or an ordinary Button1).
I expect the order to be:
1 → LostFocusTest → 3a (save).
But what really happens is:
1 → 3a (save) → LostFocusTest,
so 3a ends up saving the old, un-processed value.
The same thing occurs with Button1.
Did I miss something, or is this the normal behavior?
Any help would be appreciated—thanks!
Lost_Focus:
Private Sub EditText1_FocusChanged (HasFocus As Boolean)
If HasFocus=False Then
Log ("1")
LostFocusTest
Else
Log ("2")
End If
End Sub
Private Sub LostFocusTest()
'execute the calculation logic
End Sub
Private Sub SwiftButton1_Click
Log ("3a")
' execute the save operation
End Sub
Private Sub Button1_Click
Log ("3b")
' execute the save operation
End Sub
'
Attachments
Last edited: