Triggering the iOS keyboard

Graham Samuel livfoss at mac.com
Tue Oct 2 10:22:59 CDT 2012


This is probably a dumb question, but I'm stumped.

I've been writing an iOS app which invokes a 'native' keyboard when a user touches a field. This has been working pretty well in general, with some particular problems. In order to investigate these, I have tried to abstract the problem into an app which is a one-card stack. On opening (preOpenCard) this app instantiates a keyboard and renders it invisible, then when the user touches a field, the system fires a 'focusIn' message, which I then use to show the keyboard. Amazingly, although this works in my complicated app, it doesn't work in my simplified one. I am quite clear that the keyboard has really been instantiated and that the focusIn handler is fired, but my simple statement

 iPhoneControlSet tInputID, "visible", true

doesn't work. I just can't see why not. It's got to be finger trouble on my part but I just can't see it. I tried enabling the control as well (never needed to do this in my real app) but it had no effect.

There is an additional oddness compared with my real app which must be relevant, I suppose -  the actual control belonging to the iOS keyboard (which is not the keyboard itself but a rectangle where the user inputs text) appears without the keyboard when the app opens. If I type into that, then the keyboard appears (and a 'keyboardActivated' message is sent), but this doesn't make sense to me, and I don't get this effect in my real app. Can anyone suggest what is going on?

TIA

Graham



More information about the use-livecode mailing list