Book Image

LiveCode Mobile Development Cookbook

By : Dr. Edward Lavieri
Book Image

LiveCode Mobile Development Cookbook

By: Dr. Edward Lavieri

Overview of this book

Table of Contents (17 chapters)
LiveCode Mobile Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Querying web data


In this recipe, we will load a web page into the memory and search for specific text to be displayed. Specifically, we will load this book's web page to the Packt Publishing website and find the Who this book is for section.

How to do it...

Follow the steps in this recipe to pull data from a web page, format it, and display it to the user in your mobile app:

  1. Open LiveCode and create a new main stack.

  2. Set the background color of the stack's card to black.

  3. Drag a button to the card and set the following properties using the property inspector:

    • Name: btn_Start

    • Label: Start

    • Width: 82

    • Height: 23

    • Location: 57, 37

    • backgroundColor: White

    • threeD: Keep this unchecked

    • border: Keep this unchecked

  4. Drag a scrolling field to the card and set the following properties using the property inspector:

    • Name: fld_output

    • Width: 294

    • Height: 392

    • Location: 161, 256

    • backgroundColor: White

  5. Add the following code to the btn_Start button:

    on mouseUp
      local pageData, tLines
      put empty into fld "output...