I am using “string.upper” to convert inputted text into all upper case in a listener on a native.newTextField. See code below. It works on Simulator on PC, Simulator on Mac, and several iOS devices I tried. But on several Android devices I tried, the conversion to upper case using string.upper does not work and does nothing. I tried adding long delays as well like shown below. Could not find any solution after a lot of searching, so reaching out here for a possible answer. Thanks!
if ( event.phase == “began” ) then
elseif ( event.phase == “ended” or event.phase == “submitted” ) then
sleep(.25) --tried adding delay as well
PlayerBox[event.target.id].text = string.upper(PlayerBox[event.target.id].text)
PlayerBox[event.target.id].text = string.gsub(PlayerBox[event.target.id].text, “^%s*(.-)%s*$”, “%1”)
PlayerBox[event.target.id].align = “left”
PlayerBox[event.target.id]:setSelection( 1, 1 )
also tried…
local upp = string.upper(PlayerBox[event.target.id].text)
PlayerBox[event.target.id].text = upp