Dear experts
I have attached a simple stack containing a label field, text entry field and a button. The label field describes the issue, the text entry field is just a simple text entry field with no script or anything special, and the button just closes the stack. When I run it on android, the backspace key must be pressed twice as many times as the number of characters typed since the last space, before it actually deletes a character. Why does the backspace behave so abnormally and can it be fixed?
Thanks in advance
Cairoo
edit: When I run the app in the emulator with Android 4.2, the issue doesn't exist. The issue occurs when I run the app on my actual phone with Android 2.3.5.
Backspace issue with text entry field from tools palette
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Backspace issue with text entry field from tools palette
- Attachments
-
- testBackSpace.zip
- Test this stack on an Android device and see if the same thing happens on your device?
- (1.63 KiB) Downloaded 256 times
Re: Backspace issue with text entry field from tools palette
Hi Cairoo,
While I'm not actually solving your problem I would suggest you use a Native Control when working with mobile:
mobileControlCreate "multiline", "myMultiLineTextInput"
mobileControlCreate "input", "myTextInput"
Neither of those will work in the IDE but will in the emulator, so you should have something like:
if the environment is "mobile" then
mobileControlCreate ...
else
--just use a text field as you have.
end if
Simon
While I'm not actually solving your problem I would suggest you use a Native Control when working with mobile:
mobileControlCreate "multiline", "myMultiLineTextInput"
mobileControlCreate "input", "myTextInput"
Neither of those will work in the IDE but will in the emulator, so you should have something like:
if the environment is "mobile" then
mobileControlCreate ...
else
--just use a text field as you have.
end if
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Backspace issue with text entry field from tools palette
Thank you Simon
I will refactor my code to use native mobile controls. I just hoped I wouldn't have to because of the added complexity. My actual project has several groups containing many text entry fields, each with their own data validation scripts attached, so it's going to be no small task to refactor the code especially when the mobile controls doesn't exist in the IDE.
Now here's a thought: Wouldn't it be nice if the livecode engine were designed to automatically use the native controls on the mobile platforms?!
Thank you
Gerrie
I will refactor my code to use native mobile controls. I just hoped I wouldn't have to because of the added complexity. My actual project has several groups containing many text entry fields, each with their own data validation scripts attached, so it's going to be no small task to refactor the code especially when the mobile controls doesn't exist in the IDE.
Now here's a thought: Wouldn't it be nice if the livecode engine were designed to automatically use the native controls on the mobile platforms?!
Thank you
Gerrie
Re: Backspace issue with text entry field from tools palette
Hi Gerrie,
One of the great things about software/LC is that it is so easy to write your own tools. The only other profession I can think of where this is true is possibly poets.
Consider your task of implementing desktop/native mobile input fields, I'm guessing that it would only take about 10-20 lines of code to create a tool that transforms your desktop fields into native. If you first manually change a couple of the fields you should notice that you are repeating some of the steps. Variations between types are handled with if/then or switch/case.
Don't be dependent on RunRev to keep up with the tools you currently need.
If you do manage to make the tool you'll feel very good!
Trust me!
And if you post it here others with the same problem will thank you.
Simon
One of the great things about software/LC is that it is so easy to write your own tools. The only other profession I can think of where this is true is possibly poets.
Consider your task of implementing desktop/native mobile input fields, I'm guessing that it would only take about 10-20 lines of code to create a tool that transforms your desktop fields into native. If you first manually change a couple of the fields you should notice that you are repeating some of the steps. Variations between types are handled with if/then or switch/case.
Don't be dependent on RunRev to keep up with the tools you currently need.
If you do manage to make the tool you'll feel very good!
Trust me!
And if you post it here others with the same problem will thank you.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!