O'Reilly logo

Palm Programming: The Developer's Guide by Julie McKeehan, Neil Rhodes

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

Chapter 5. Forms and Form Objects

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.

Resources

A resource 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 .PRC ).

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.

Creating Resources in Constructor

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 ...

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