This chapter describes forms and form objects. Before we cover these subjects, however, we explain how the resources associated with the forms are created and used. Your application is stored in the form of resources. Once we discuss resources and forms in general, we give you some programming tips for creating specific types of forms (like alerts). Last, we turn to a discussion of resources and forms in the sample application.
is a relocatable block marked with a four-byte type (usually
represented as four characters, like CODE or tSTR) and a two-byte ID.
Resources are stored in a
resource database (on the
desktop, these files end in the extension
An application is a resource database. One of the resources in this database contains code, another resource contains the application’s name, another the application’s icon, and the rest contain the forms, alerts, menus, strings, and other elements of the application. The Palm OS uses these resources directly from the storage heap (after locking them) via the Resource Manager.
The two most common tools to create Palm OS application resources are CodeWarrior’s Constructor tool or PilRC as part of the GCC collection of tools. Our discussion turns to Constructor first and PilRC second.
CodeWarrior’s Constructor is a visual resource editor: you lay out the user interface object resources using a graphical layout tool.
In the following example, we ...