Hello Graham, The following works as expected for me:
on opencard global gInputID if environment() = "mobile" then mobileControlCreate "input" -- so the user can type in put the result into gInputID answer "opening text field for input. ID created is:" && gInputID mobileControlSet gInputID, "rect", "114,135,163,158" mobileControlSet gInputID, "visible", "true" mobileControlSet gInputID, "opaque", "true" mobileControlSet gInputID, "borderstyle", "line" end if end opencard also I have added two buttons to test the other issues: script of button 1: on mouseup local tText global gInputID put mobileControlGet(gInputID,"text") into tText answer tText end mouseup script of button 2: on mouseUp pButtonNumber global gInputID mobileControlSet gInputID, "keyboardType", "numeric" mobileControlDo gInputID, "focus" end mouseUp Also, while testing the focus, I realised that you have to enable the setting "Toggle Software Keyboard" in the simulator menubar (Hardware -> Keyboard -> Toggle Software Keyboard). Important: Note that you have to FIRST click on the field with the mouse to focus it, and THEN check this option, otherwise your choice will not have any effect. This might be a bug in the simulator app, but once you do that, your choice of showing the soft keyboard will be remembered. So now, if you add some text to the field, it will be returned correctly if you press the first button. Also, if you click on the second button, you should see a numeric soft keyboard appearing, and the field will get the focus. Hope this helps. Kind regards, Panos -- On Thu, 23 Apr 2020 at 14:03, panagiotis merakos <merak...@gmail.com> wrote: > Hello Graham, > > Oh, ignore my previous comment about mobileControlDo <inputField>, > "focus", as this bug affected Android only. > > I'll try to reproduce the recipe here and see if I get the same problem. > > Kind regards, > Panos > -- > > > On Thu, 23 Apr 2020 at 13:54, panagiotis merakos <merak...@gmail.com> > wrote: > >> Hello Graham, >> >> >> >> >> >> >> *> but despite executing> > mobileControlSet "FRadiusText", >> "keyboardType", "numeric"> mobileControlDo "FRadiusText", "focus"> > >> following what the LC Dictionary says , I do not see the soft keyboard* >> >> This will not work in LC 9.5.1 - it is an old bug that is fixed in LC 9.6 >> DP-3: >> >> https://github.com/livecode/livecode/pull/7259 >> >> *>>nor does a subsequent* >> >> *> mobileControlGet "FRadiusText", "text"> ever result in anything but >> empty even though I can see a text in the native field object.* >> >> Are you calling mobileControlGet "FRadiusText", "text" from the same >> handler that has created the mobile input field, or from a different one? >> >> Kind regards, >> Panos >> -- >> >> On Wed, 22 Apr 2020 at 23:39, Graham Samuel via use-livecode < >> use-livecode@lists.runrev.com> wrote: >> >>> >>> >>> Sent from my iPad >>> >>> Begin forwarded message: >>> >>> > From: Graham Samuel <livf...@mac.com> >>> > Date: 22 April 2020 at 22:14:37 CEST >>> > To: Mark Waddingham <m...@livecode.com> >>> > Subject: Re: Mobile text input mystery >>> > >>> > Thanks Mark. Although making the field opaque wasn’t enough, giving >>> it a black border worked and I can now see it. I can edit it with the >>> mouse, and I can even put something in it with >>> > >>> > mobileControlSet "FRadiusText", "text", "1.0" >>> > >>> > but despite executing >>> > >>> > mobileControlSet "FRadiusText", "keyboardType", "numeric" >>> > mobileControlDo "FRadiusText", "focus" >>> > >>> > following what the LC Dictionary says , I do not see the soft >>> keyboard, nor does a subsequent >>> > >>> > mobileControlGet "FRadiusText", "text" >>> > >>> > ever result in anything but empty even though I can see a text in the >>> native field object. >>> > >>> > But I can’t keep asking questions. I’ll just tinker as usual and hope >>> to get a result. >>> > >>> > Thanks again >>> > >>> > Graham >>> > >>> >> On 22 Apr 2020, at 19:52, Mark Waddingham <m...@livecode.com> wrote: >>> >> >>> >>> On 2020-04-22 18:38, Graham Samuel wrote: >>> >>> Reading your response, Mark, I didn't feel so bad, since the LC >>> >>> Dictionary says for example about mobileControlSet >>> >>> syntax: mobileControlSet idOrName, PropertyName, value >>> >>> and later explains >>> >>> idOrName - the id or name of the control >>> >>> So I therefore saw the two ways of referring to the control as >>> >>> apparently interchangeable. >>> >> >>> >> It is - apologies - the engine does look up both by id or name... >>> >> >>> >> Do you see something if you also set the 'text' property? >>> >> >>> >> There's also the 'borderStyle' property too. >>> >> >>> >> My hunch is that something is there, but the background color is the >>> same as the card, the border style is none and it has no content so it >>> looks like nothing is there? >>> >> >>> >> Warmest Regards, >>> >> >>> >> Mark. >>> >> >>> >> -- >>> >> Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/ >>> >> LiveCode: Everyone can create apps >>> > >>> _______________________________________________ >>> use-livecode mailing list >>> use-livecode@lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your >>> subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >>> >> _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode