Chapter 16. Programming Your Appâs Memory
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, your brain stores it in a memory slot. If someone calls out some numbers for you to add, you store the numbers and intermediate results in memory slots. 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.
The user of an app can see visible components such as buttons, textboxes, and labels. Internally, however, each component is completely defined by a set of properties. The values stored ...