S susu Well-Known Member Licensed User Longtime User Jan 18, 2015 #1 Hi, I use this code to get value of text field with keyboard: Code: Copy Sub txtSearch_TextChanged (OldText As String, NewText As String) searchstring = NewText.Trim Log(searchstring) End Sub If I type "t" + "u" + "s" the text in text field display "tú" but the value in log is "tus". If I add a space, the value in log will be correct ("tú"). How can I get correct value as display in text field? Thanks. Last edited: Jan 18, 2015
Hi, I use this code to get value of text field with keyboard: Code: Copy Sub txtSearch_TextChanged (OldText As String, NewText As String) searchstring = NewText.Trim Log(searchstring) End Sub If I type "t" + "u" + "s" the text in text field display "tú" but the value in log is "tus". If I add a space, the value in log will be correct ("tú"). How can I get correct value as display in text field? Thanks.
Erel B4X founder Staff member Licensed User Longtime User Jan 18, 2015 #2 I see it too. However this event is raised by the native UITextField with this value so it seems like a bug in the native layer. Workaround: Code: Copy Sub TextField1_TextChanged (OldText As String, NewText As String) CallSubDelayed(Me, "CheckText") End Sub Sub CheckText Log(TextField1.Text) End Sub Upvote 0
I see it too. However this event is raised by the native UITextField with this value so it seems like a bug in the native layer. Workaround: Code: Copy Sub TextField1_TextChanged (OldText As String, NewText As String) CallSubDelayed(Me, "CheckText") End Sub Sub CheckText Log(TextField1.Text) End Sub
S susu Well-Known Member Licensed User Longtime User Jan 19, 2015 #3 Thanks Erel but your workaround did not work on iOS 7.1.2 Upvote 0
S susu Well-Known Member Licensed User Longtime User Jan 19, 2015 #4 I tried with a timer and it worked! Upvote 0