Keyboard in IOS and Field Focus

PystCat pystcat at gmail.com
Thu Nov 7 10:03:33 EST 2013


How would you create a native on/off switch...?  Where can I find a listing of the native iOS controls...?  I only see the browser/multiline/input fields in the dictionary.


> On Nov 7, 2013, at 6:55 AM, Dave Kilroy <dave at applicationinsight.com> wrote:
> 
> Hi Vaughn
> 
> If you want to use an ordinary LiveCode field in an iOS or Android
> application you just use it, as per normal
> 
> However for mobile things are different, for example if you want to use a
> slider in iOS created by iOS itself (a native control) then you need to set
> everything up in Livecode so that when the app is built (during the
> compiling with Xcode I guess, not sure exactly where it happens) LiveCode
> knows to swap out special code a developer will include with an iOS 'native'
> slider. 
> 
> See the dictionary for more on this, for example if you search for
> "mobileControlCreate" in the dictionary you will see that the following two
> lines of code sets up a native text field (controlType = "input") to be
> created when the app is built:
> 
> put "input" into tControlType
> mobileControlCreate tControlType, "myFirstInputField"
> 
> Please note that while your app is in the IDE it will not have any iOS or
> Android controls, these are only added when built (either as standalones or
> for simulator)
> 
> I've just found a lesson on using native controls here:
> http://lessons.runrev.com/s/3527/m/4069/l/29112-how-do-i-use-native-text-controls-on-mobile
> 
> -------------
> 
> Yes 'TraversalOn' is in property inspector and you can also set and unset it
> with code
> 
> If you run an app with Livecode fields in a simulator you'll see the fields
> in the 'motif' theme (along with all LiveCode controls) which makes them
> look like refugees from from 1990 - native fields on the other hand look
> nice!
> 
> For example of moving fields up and down to cater for the keyboard check out
> this lesson:
> http://lessons.runrev.com/s/3527/m/4069/l/136724-move-a-native-mobile-text-input-control-so-it-is-not-covered-by-keyboard
> 
> Yes you can group all your fields and move these up and down - it all
> depends on your GUI and what you are trying to do...
> 
> I'm not sure if you need a 'focus on nothing' in an exitField handler, I
> just have one in a mouseDown handler in the card (where else can the person
> tap to leave the field?) and that seems to work - but again it will depend
> on your GUI and what you are trying to do...
> 
> I think I've covered all your queries, let me know if I've missed any (or if
> you have any new ones)
> 
> Dave
> 
> 
> 
> 
> -----
> "Some are born coders, some achieve coding, and some have coding thrust upon them." - William Shakespeare & Hugh Senior
> 
> --
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/Keyboard-in-IOS-and-Field-Focus-tp4671935p4671994.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list