On 2020-04-22 17:00, Graham Samuel via use-livecode wrote:
As usual, the problem will be my fault, but I can’t get a mobile input field to appear on a card. I’m debugging it at present, which explains the answer statement:on opencard -- we dynamically create a field for the user to key in global sinputID -- this is all from the LC lesson. It’s a global because I need to refer to it in a button later if environment() = "mobile" thenmobileControlCreate "input", "FMyText" -- so the user can type input the result into sinputID — the Dictionary doesn’t mention ‘the result’ but it does seem to be rightanswer "opening text field for input. ID created is:" && sinputIDmobileControlSet sinputID, "rect", “114,135,163,158” — this is a real location on the card mobileControlSet sinputID, "visible", "true" mobileControlSet sinputID, "opaque", "true" end if end opencard
I'm pretty sure if you give your mobileControl a name (FMyText) in this case, then that is the only way you can refer to it. You can only use 'the result' of the Create function *if* you didn't give it a name.
So you need to do either: mobileControlCreate "input", "FMyText" mobileControlSet "FMyText", ... OR mobileControlCreate "input" put the result into sinputID mobileControlSet sinputID, ... Warmest Regards, Mark. -- Mark Waddingham ~ [email protected] ~ http://www.livecode.com/ LiveCode: Everyone can create apps _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
