O'Reilly logo

LiveCode Mobile Development HOTSHOT by Edward D Lavieri Jr.

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

Accepting user input

In this section, we will add LiveCode scripts to our mobile application's interface objects. We will first create a set of global variables at the stack level so that user input can be captured and used. We will use the "first number operator second number" schema for our calculations.

Engage Thrusters

Accepting user input can be a very important component of mobile applications. The key to successfully handling user input is to ensure the proper variables are set up. We'll begin with global variables next.

Creating and initializing global variables

Our first step is to create a set of global variables in the stack. Enter the following code:

on preOpenStack global firstNumber, secondNumber, theOperator, theMode clearAll end preOpenStack ...

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