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.
Open the Stack script.
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 instead, such as Send, or Done. Unfortunately, we are entering text into fields that are able to take a return character. To solve this issue, we set the Return button to say Done, which will lead the user to expect the keyboard to go...