O'Reilly logo

LiveCode Mobile Development Beginner's Guide - Second Edition by Joel Gerdeen, Colin Holgate

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

Loading and saving external data

In many applications, you will want to keep track of changes that a user has made. There are several ways to do this with LiveCode, including querying a URL, reading and writing to a text file, and saving data inside a stack.

Querying a URL

Quite often, web-based applications load and save data from server-side scripts. This can work with LiveCode apps too. Here's an example which shows the closing share price for Google yesterday:

put url "http://quote.yahoo.com/d/quotes.csv?s=GOOG&f=p"

At the moment of writing this book, this line was tested and 609.46 appeared in the Message Box, shown as follows:

Querying a URL

Who knows what ...

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