Mobile keyboard

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ameguira@gmail.com
Posts: 22
Joined: Mon Apr 18, 2016 4:57 pm

Mobile keyboard

Post 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
LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 870
Joined: Fri Feb 06, 2015 4:03 pm

Re: Mobile keyboard

Post by LiveCode_Panos »

Hello ameguira,

You should use the following line:

Code: Select all

mobileSetKeyboardType "numeric"
Best,
Panos
--
ameguira@gmail.com
Posts: 22
Joined: Mon Apr 18, 2016 4:57 pm

Re: Mobile keyboard

Post 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
ameguira@gmail.com
Posts: 22
Joined: Mon Apr 18, 2016 4:57 pm

Re: Mobile keyboard

Post 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
LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 870
Joined: Fri Feb 06, 2015 4:03 pm

Re: Mobile keyboard

Post 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
--
Post Reply