Time for action – making the test bed stack

Before we create the iOS and Android apps, we should get what we want ready, as a LiveCode stack and fully test it on our desktop computers. The following steps are going to assume that you know how to do what is asked in LiveCode, without precise instructions.

  1. Open LiveCode, create a new Mainstack, and save it as LCTestBed.
  2. Set the screen size to 320 x 480. This is just to make sure that things appear on the smallest of screens. The things we will make, will appear at the upper-left corner area of the larger screens.
  3. We are going to make a button for each card in the stack; let's start by making a card named Menu.
  4. Add buttons for Email, Browser, DatePicker, and Picture. Make sure that the buttons are big enough to touch on your devices. You should have something like what is shown here:
    Time for action – making the test bed stack
  5. Create four new cards and name each one so that they match the button names.
  6. Back at the first card, set the script of each button to go to the matching cards with this script:
    on mouseUp
    go card the short name of me
    end mouseUp
  7. On each card, create a button to return to the Menu card. Name the button Menu. Set its script to the same as the other buttons.
  8. Select the Run (browse) tool and try clicking on the buttons to jump to the four cards and back to the menu.

What just happened?

Well, nothing too exciting! However, you should now have five cards and the ability to go in and out of the Menu card. We're going to add scripts to each card to help illustrate its various features. The most efficient approach will be to add all the scripts and related buttons and fields and then to test the final test bed app in one go. However, where's the fun in that! Instead, we'll go one feature at a time…

Invoking the desktop e-mail application

There are many cases where you may want to hear from the users of your applications. Perhaps, you want them to e-mail suggested improvements or to ask you questions. You could easily launch their e-mail program and leave the user to figure out what to write. Alternately, you could set the To address, Subject, and even some of the Body of the message. At the very least, it would make your life easier because you could filter incoming e-mails based on something that you placed in the Subject field.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset