O'Reilly logo

LiveCode Mobile Development Beginner's Guide by Colin Holgate

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – adding Stack level functions

For this app, we're going to put some of the logic in the buttons on the cards themselves, but it still leaves a good amount that goes into the Stack script. To make it less overwhelming, we'll show one or two functions at a time followed by some explanation about any interesting points.

  1. Open the Stack script.
  2. Type in the following handlers:
    on openstack
       if the platform is "iphone" then iPhoneSetKeyboardReturnKey "done"
       readdata
       showdata
    end openstack
    
    on returnInField
       focus on nothing
    end returnInField

    Note

    Android OS keyboards generally have a button dedicated to putting the keyboard away. However, that isn't the case on iOS; the button that sits where the Return key should be may have a special word ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required