help with mobileSetKeyboardType

Dan Friedman dan at clearvisiontech.com
Thu Sep 26 16:15:38 EDT 2019


I too was not able to get this to work:

mobileControlSet “input”, “keyboardType”, “search”

But, I see that "search" is not listed in the docs as an acceptable keyboardType value.  When I tried any of the listed values, it did work.

Thanks for the assist Devin!

-Dan


On 9/26/19, 12:53 PM, "use-livecode on behalf of J. Landman Gay via use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of use-livecode at lists.runrev.com> wrote:

    FWIW, I couldn't get this to work at all:
    
    mobileControlSet “input”, “keyboardType”, “search”
    
    The only thing that worked for me was mobileSetKeyboardType, with the 
    caveat that it had to be issued after the native control was created. 
    And the glitch there is that it doesn't take effect until the keyboard 
    is re-activated, so you have to make sure that the field isn't focused 
    until after you set up the native control. That is, if the keyboard pops 
    up due to auto-focusing when the card opens, the keyboard won't be right 
    until the next time it appears.
    
    On 9/26/19 1:45 PM, Devin Asay via use-livecode wrote:
    > Dan,
    > 
    > I believe it’s because setting keyboard type with a mobile native control is done by setting a property with mobileControlSet:
    > 
    > mobileControlCreate "input","_editingField”
    > mobileControlSet “input”, “keyboardType”, “number”
    > 
    > The mobileSetKeyboardType command works in all other circumstances, including with native LiveCode fields.
    > 
    > Devin
    > 
    > 
    >> On Sep 26, 2019, at 12:31 PM, Dan Friedman via use-livecode <use-livecode at lists.runrev.com> wrote:
    >>
    >> I am having some trouble with mobileSetKeyboardType.  Can anyone tell me why mobileSetKeyboardType works with this:
    >>
    >> mobileSetKeyboardType "number"
    >> ask "Enter a number"
    >>
    >> But it doesn’t work with this:
    >>
    >> mobileSetKeyboardType "number"
    >> mobileControlCreate "input","_editingField"
    >> mobileControlSet "_editingField","rect","20,20,200,60"
    >> mobileControlSet "_editingField","text","123"
    >> mobileControlSet "_editingField","visible",true
    >> mobileControlDo "_editingField","focus"
    >>
    >> Doesn't seem to matter what I set mobileSetKeyboardType to or when I set it.  It always shows the "normal" keyboard.
    >>
    >> Using LiveCode Business 9.5.0, testing on a iPhone X
    >>
    >> -Dan
    >>
    >> _______________________________________________
    >> use-livecode mailing list
    >> use-livecode at lists.runrev.com
    >> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
    >> http://lists.runrev.com/mailman/listinfo/use-livecode
    > 
    > Devin Asay
    > Director
    > Office of Digital Humanities
    > Brigham Young University
    > 
    > _______________________________________________
    > use-livecode mailing list
    > use-livecode at lists.runrev.com
    > Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
    > http://lists.runrev.com/mailman/listinfo/use-livecode
    > 
    
    
    -- 
    Jacqueline Landman Gay         |     jacque at hyperactivesw.com
    HyperActive Software           |     http://www.hyperactivesw.com
    
    
    _______________________________________________
    use-livecode mailing list
    use-livecode at lists.runrev.com
    Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
    http://lists.runrev.com/mailman/listinfo/use-livecode
    



More information about the use-livecode mailing list