iOS Question Keyboard problem with my language

Discussion in 'iOS Questions' started by susu, Jan 18, 2015.

  1. susu

    susu Well-Known Member Licensed User

    Hi,

    I use this code to get value of text field with keyboard:

    Code:
    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
  2. Erel

    Erel Administrator Staff Member Licensed User

    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:
    Sub TextField1_TextChanged (OldText As String, NewText As String)
       CallSubDelayed(Me, 
    "CheckText")
    End Sub

    Sub CheckText
       
    Log(TextField1.Text)
    End Sub
     
    susu likes this.
  3. susu

    susu Well-Known Member Licensed User

    Thanks Erel but your workaround did not work on iOS 7.1.2
     
  4. susu

    susu Well-Known Member Licensed User

    I tried with a timer and it worked!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice