Re: Mobile text input mystery

2020-04-24 Thread Håkan Liljegren via use-livecode
Have you tried to add a background color to the control so you can actually see 
it? Then the dictionary actually tells you that the result holds the ID. I know 
that you can then use them both. I usually use the ID as that is guaranteed to 
be unique.

Håkan
On 22 Apr 2020, 19:39 +0200, Graham Samuel via use-livecode 
, 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.
>
> 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 
> >  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 ~ 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
___
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


Re: Mobile text input mystery

2020-04-23 Thread panagiotis merakos via use-livecode
You're welcome, Graham - thanks for the follow up.

I'll make sure we add a note about this simulator keyboard trick in the
dictionary.

Kind regards,
Panos
--

On Thu, 23 Apr 2020 at 15:33, Graham Samuel via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Thanks a million, Panos, it all works! Apart from the simulator keyboard
> trick, I can’t see immediately what I did wrong. Probably haven’t got time
> to crawl over it now… obviously I can use this as a model in any part of
> the app that needs it.
>
> Thanks again
>
> Graham
>
> > On 23 Apr 2020, at 13:39, panagiotis merakos via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > 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 
> wrote:
> >
> >> Hello Graham,
> >>
> >> Oh, ignore my previous comment about mobileControlDo ,
> >> "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 
> >> 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
> >>> --
> >>>
> >>

Re: Mobile text input mystery

2020-04-23 Thread Graham Samuel via use-livecode
Thanks a million, Panos, it all works! Apart from the simulator keyboard trick, 
I can’t see immediately what I did wrong. Probably haven’t got time to crawl 
over it now… obviously I can use this as a model in any part of the app that 
needs it.

Thanks again

Graham

> On 23 Apr 2020, at 13:39, panagiotis merakos via use-livecode 
>  wrote:
> 
> 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  wrote:
> 
>> Hello Graham,
>> 
>> Oh, ignore my previous comment about mobileControlDo ,
>> "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 
>> 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 
>>>>> Date: 22 April 2020 at 22:14:37 CEST
>>>>> To: Mark Waddingham 
>>>>> 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"
>>&g

Re: Mobile text input mystery

2020-04-23 Thread Graham Samuel via use-livecode
Sorry Panos, my short email crossed with your long one. I am trying all your 
suggestions now!

Graham

> On 23 Apr 2020, at 13:39, panagiotis merakos via use-livecode 
>  wrote:
> 
> 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  wrote:
> 
>> Hello Graham,
>> 
>> Oh, ignore my previous comment about mobileControlDo ,
>> "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 
>> 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 
>>>>> Date: 22 April 2020 at 22:14:37 CEST
>>>>> To: Mark Waddingham 
>>>>> 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", &

Re: Mobile text input mystery

2020-04-23 Thread Graham Samuel via use-livecode
Just tried it after switching to LC9.6.0 DP4 - no change. I’m keen to see if 
you can indeed reproduce it.

Graham

> On 23 Apr 2020, at 13:03, panagiotis merakos via use-livecode 
>  wrote:
> 
> Hello Graham,
> 
> Oh, ignore my previous comment about mobileControlDo , "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  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 
>>>> Date: 22 April 2020 at 22:14:37 CEST
>>>> To: Mark Waddingham 
>>>> 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  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


___
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


Re: Mobile text input mystery

2020-04-23 Thread panagiotis merakos via use-livecode
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  wrote:

> Hello Graham,
>
> Oh, ignore my previous comment about mobileControlDo ,
> "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 
> 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 
>>> > Date: 22 April 2020 at 22:14:37 CEST
>>> > To: Mark Waddingham 
>>> > 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
>>> >
>>> >>

Re: Mobile text input mystery

2020-04-23 Thread panagiotis merakos via use-livecode
Hello Graham,

Oh, ignore my previous comment about mobileControlDo , "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  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 
>> > Date: 22 April 2020 at 22:14:37 CEST
>> > To: Mark Waddingham 
>> > 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  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


Re: Mobile text input mystery

2020-04-23 Thread panagiotis merakos via use-livecode
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 
> > Date: 22 April 2020 at 22:14:37 CEST
> > To: Mark Waddingham 
> > 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  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


Fwd: Mobile text input mystery

2020-04-22 Thread Graham Samuel via use-livecode


Sent from my iPad

Begin forwarded message:

> From: Graham Samuel 
> Date: 22 April 2020 at 22:14:37 CEST
> To: Mark Waddingham 
> 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  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


Re: Mobile text input mystery

2020-04-22 Thread Graham Samuel via use-livecode
 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 
>  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 ~ 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


Re: Mobile text input mystery

2020-04-22 Thread Mark Waddingham via use-livecode

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 ~ 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


Mobile text input mystery

2020-04-22 Thread Graham Samuel via use-livecode
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


As far as I’m concerned this comes straight out of the LC dictionary. When I 
run this in the iPhone simulator, it the ‘answer’ fires, and the ID is 1. But 
nothing appears on the card.

Can anyone explain what I’m doing wrong this time? I seem to have a lot of 
trouble getting dynamic elements like fields, keyboards and selection scrollers 
to appear, but the above is the simplest problem I have in that line.

Graham
___
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