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.
However, I changed my openCard handler according to your suggestion and nothing
at all changed. I think there must be some other factor, but as usual I just
can’t see it.
Just to labour the point, here is my actual handler with the original names in
place. The answer call works as expected:
on opencard -- we dynamically create a field for the user to key in the radius
global sinputID -- this is all from the LC lesson
if environment() = "mobile" then
mobileControlCreate "input", "FRadiusText" -- so the user can type in
put the result into sinputID
answer "opening text field for radius input. ID created is:" && sinputID
&& "Name is:" && "FRadiusText"
mobileControlSet "FRadiusText", "rect", "114,135,163,158" -- this is where
the original rect was
mobileControlSet "FRadiusText", "visible", "true"
mobileControlSet "FRadiusText", "opaque", "true"
end if
end opencard
Still puzzled
Graham
> On 22 Apr 2020, at 18:34, Mark Waddingham via use-livecode
> <[email protected]> wrote:
>
> 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" then
>> mobileControlCreate "input", "FMyText" -- so the user can type in
>> put the result into sinputID — the Dictionary doesn’t mention
>> ‘the result’ but it does seem to be right
>> answer "opening text field for input. ID created is:" && sinputID
>> mobileControlSet 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
_______________________________________________
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