Skip to Main Content
App Inventor
book

App Inventor

by David Wolber, Hal Abelson, Ellen Spertus, Liz Looney
May 2011
Beginner to intermediate content levelBeginner to intermediate
386 pages
11h 41m
English
O'Reilly Media, Inc.
Content preview from App Inventor

Chapter 16. Programming Your App’s Memory

image with no caption

Just as people need to remember things, so do apps. This chapter examines how you can program an app to remember information.

When someone tells you the phone number of a pizza place for a one-time immediate call, your brain stores it in a memory slot. If someone calls out some numbers for you to add, you also store the immediate results in a memory slot. In such cases, you are not fully conscious of how your brain stores information or recalls it.

An app has a memory as well, but its inner workings are far less mysterious than those of your brain. In this chapter, you’ll learn how to set up an app’s memory, how to store information in it, and how to retrieve that information at a later time.

Named Memory Slots

An app’s memory consists of a set of named memory slots. Some of these memory slots are created when you drag a component into your app; these slots are called properties. You can also define named memory slots that are not associated with a particular component; these are called variables. Whereas properties are typically associated with what is visible in an app, variables can be thought of as the app’s hidden “scratch” memory.

Properties

Components—at least the visible ones like Button, TextBox, and Canvas—are part of the user interface. But to the app, each component is completely defined by a set of properties. The values stored in the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hello App Inventor!

Hello App Inventor!

Carl Simmons, Paula Beer
App Inventor 2 Essentials

App Inventor 2 Essentials

Felicia Kamriani, Krishnendu Roy
App Inventor 2, 2nd Edition

App Inventor 2, 2nd Edition

David Wolber, Hal Abelson, Ellen Spertus, Liz Looney

Publisher Resources

ISBN: 9781449306786Supplemental ContentErrata Page