Sorry Mike, I missed the manual part of your question the first time. At a minimum, I learned about mobileControlTarget. Don't know how I missed that in the docs.
Does anyone have a suggestion on how to handle the mobile field with keyboard movements? Specifically, I want the controls to slide up and down as the keyboard is (de)-activated. But if the field has content, resetting the rect causes some flashing even if I set the mobile control vis to false. thanks, - eric > On Aug 30, 2014, at 7:20, Mike Kerner <[email protected]> wrote: > > And, yes, I'm well aware of how to do it manually. > > > On Sat, Aug 30, 2014 at 10:18 AM, Mike Kerner <[email protected]> > wrote: > >> mobilecontroltarget doesn't tell me what mobile field has the focus right >> now, it tells me what I just clicked on, which is not the field with the >> focus. >> >> >> On Sat, Aug 30, 2014 at 12:38 AM, Eric Corbett <[email protected]> >> wrote: >> >>> Come on Gerry, that's too simple :-) >>> >>> Now I have to completely rethink my mobileControl library :-( >>> >>> Too easy. >>> >>> Still some work dealing with mobile fields and the keyboard and such, but >>> until native mobile controls become native to LiveCode, it's worth it. >>> >>> E >>> >>>> On Aug 29, 2014, at 8:46 PM, Gerry wrote: >>>> >>>> iPhoneControlTarget() >>>> >>>> Gerry >>>> >>>>> On 30 August 2014 13:26, Eric Corbett <[email protected]> wrote: >>>>> Hi Mike, >>>>> >>>>> In my limited use of the native field on mobile, I have come across >>> some key features. >>>>> >>>>> First, when you create the field, I would recommend creating each one >>> in a separate control, like a desktop field to be used as a place holder. >>> Here's the reason: >>>>> >>>>> inputBeginEditing >>>>> inputTextChanged >>>>> inputEndEditing >>>>> inputReturnKey >>>>> >>>>> These messages are sent to the script that created the mobile field. >>> Therefore, when more than one field is required on a card, I create a >>> behavior and each dummy field uses the one behavior. Then at the >>> appropriate time (openCard possibly), I send a dispatch to each field to >>> create the appropriate field. I use switch statements in my create field >>> handler to set the appropriate settings like mobileControlSet >>> [control],"keyboardType","[value]; "returnKeyType","[value]", etc. I also >>> use a switch statement in inputReturnKey to determine what to do next. The >>> switch cases become the short name of me since the object is the field and >>> of course the desktop dummy field is named the same as the native mobile >>> field. >>>>> >>>>> I guess each card would have a different behavior so the one script is >>> not switching between too many fields. You could also create behaviors for >>> specific groups, but the need to set the behavior of the dummy fields is >>> the key, not setting the behavior of the group. One other option to try to >>> create a mobileControlCreate library might be by to chain behaviors, but >>> that's a complicated subject I am looking forward to hearing more about at >>> the conference in Scott Rossi's 'Well Behaved Behaviors' talk. >>>>> >>>>> One other command to keep in mind is mobileControlDo. Specifically, >>> mobileControlDo [control name or ID], "focus". This will cause focus on the >>> field and up comes the keyboard. On iOS, the keyboardActivated message is >>> sent, but on Android, this feature is still broken. To take focus away, the >>> only thing I know to do script wise is 'focus on nothing'. >>>>> >>>>> Maybe there's another way; I'll keep my eye on the thread to see who >>> has more experience and a better idea. >>>>> >>>>> HTH >>>>> >>>>> Eric >>>>> >>>>>> On Aug 29, 2014, at 8:05 PM, Mike Kerner wrote: >>>>>> >>>>>> How do I figure out which native mobilc field has the focus (or if no >>>>>> native field does)? >>>>>> >>>>>> A field doesn't lose the focus when you do other things like hit >>> buttons, >>>>>> or throw up pick lists, which can make it tricky to deal with fields >>> that >>>>>> have updated values. >>>>>> >>>>>> focusedObject() doesn't seem to work as advertised (it returns the >>> same >>>>>> value no matter which mobile field has the focus, or for that matter, >>> if no >>>>>> field has the focus). >>>>>> >>>>>> I know I could do it the hard way, manually, but... >>>>>> >>>>>> -- >>>>>> On the first day, God created the heavens and the Earth >>>>>> On the second day, God created the oceans. >>>>>> On the third day, God put the animals on hold for a few hours, >>>>>> and did a little diving. >>>>>> And God said, "This is good." >>>>>> _______________________________________________ >>>>>> 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 >>>> >>>> _______________________________________________ >>>> 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 >> >> >> >> -- >> On the first day, God created the heavens and the Earth >> On the second day, God created the oceans. >> On the third day, God put the animals on hold for a few hours, >> and did a little diving. >> And God said, "This is good." > > > > -- > On the first day, God created the heavens and the Earth > On the second day, God created the oceans. > On the third day, God put the animals on hold for a few hours, > and did a little diving. > And God said, "This is good." > _______________________________________________ > 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
