Page 1 of 1

Mobile keyboard

Posted: Sun Jun 11, 2017 5:26 pm
by ameguira@gmail.com
Hi to all LC users

I want to use a numerical keyboard if the platform is "mobile"
The instruction is SetMobileKeyboardType to "numerical"
I put this command in two handlers: PreOpenStack and OpenCard. It works and now without changing NOTHING, I have the alpha keyboard again, which I do not want to have
Do you know where I should put this instruction:
- Stack
- Card
- or field

Thank you for your help

Re: Mobile keyboard

Posted: Sun Jun 11, 2017 6:02 pm
by LiveCode_Panos
Hello ameguira,

You should use the following line:

Code: Select all

mobileSetKeyboardType "numeric"
Best,
Panos
--

Re: Mobile keyboard

Posted: Mon Jun 12, 2017 9:45 am
by ameguira@gmail.com
Hello Panos

Thank you for your response
This is exactly what I have used (my post was wrong about the command but my code was right)

Regards
Albert MEGUIRA

Re: Mobile keyboard

Posted: Mon Jun 12, 2017 12:59 pm
by ameguira@gmail.com
Hi All

The solution is not to write

if the platform is "mobile"
then MobileSetKeyboard "numeric"

but

if the environment is "mobile"
then MobileSetKeyboard "numeric"

It works and don't ask me why...
Hope this will help other

Albert

Re: Mobile keyboard

Posted: Mon Jun 12, 2017 7:46 pm
by LiveCode_Panos
Hi Albert,

Oh I see. The "platform" returns the name of the operating system LiveCode is running on, so it cannot return "mobile". In this case it returns either "iPhone" or "Android".

Best,
Panos
--