i have a problem that the Backspacekey is not working on Android (tested on phone and tablet), but it works on the Android Emulator.
Of course it could be my mistake (that's probably it but....)
Any help will be great on this

It's just 2 entry field with only one line of text. One for the URL and one for a max 2 digits entry. A mistake is easily made so it would be great if backspace works.
I added a code that would erase the whole line(it's not working) but just erasing one character at a time would also be benificial.
This is the card script:
Code: Select all
global gIP
global gNr
on preOpenCard
set the acceleratedrendering of this stack to false
set the vScroll of field"address" of card 3 to 0
set the vScroll of field"dispnr" of card 3 to 0
end preOpenCard
on openCard
mobileControlCreate "input", "myIPAddress"
mobileSetKeyboardType "alphabet"
mobileControlSet "myIPAddress", "visible", true
mobileControlSet "myIPAddress", "rect", "50,500,250,100"
mobileControlSet "textColor", "black"
mobileControlSet "• backgroundColor", "white"
put mobilecontrolget("input","myIPAddress") into gIP
end openCard
on closeCard
set the acceleratedrendering of this stack to true
end closeCard
Code: Select all
global gIP
#set the acceleratedrendering of this stack to false
mobileControlCreate "multiline", "myTextInput"
mobileSetKeyboardType "alphabet"
on backspaceKey
put empty into me
end backspaceKey
on returnInField
if field "address" is empty then answer "Fill in server address first." & cr & "Begin with http:// and do NOT use / at the end" with "Ok"
else if field "address"contains "http://" then
put field "address" into URL ( "file:" & specialFolderPath("Documents") & "/showitIP.txt" )
put field "address" into gIP
answer "Thank you. The server address you entered is set." with "Ok"
focus on nothing
#set the acceleratedrendering of this stack to true
go to card 1
else answer "Only server addresses starting with http:// are allowed." with "Ok"
#send "mouseUp" to button"set" of card 2
end returnInField
Code: Select all
global gNr
#set the acceleratedrendering of me to false
mobileControlCreate "multiline", "myTextInput"
mobileSetKeyboardType "numeric"
on backspaceKey
put empty into me
end backspaceKey
on keyDown pKey
#if pKey is a number then
if the length of me >= 2 then
// If there are 2 or more characters in the field
// beep and prevent text entry
//beep
else
// Allow text entry by passing the keyDown message
pass keyDown
end if
#end if
end keyDown
on returnInField
if field "dispnr" is empty then answer "Fill in display number first." with "Ok"
else
put field "dispnr" into gNr
send mouseUp to button "Setdispnr"
focus on nothing
#set the acceleratedrendering of me to true
end if
end returnInField
Thanks for any help
