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.
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.
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 ...