O'Reilly logo

Palm OS Programming, 2nd Edition by Neil Rhodes, Julie McKeehan

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

Resources

A resource is a relocatable block marked with a 4-byte type (usually represented as four characters, like code or tSTR) and a 2-byte ID. Resources are stored in a resource database (on the desktop, these files end in the extension .prc ).

A Palm OS application is stored in the form of resources; in other words, 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:

  • Palm’s Constructor, a graphical resource editor

  • PilRC, which compiles text descriptions of resources—available to use with the PRC-Tools tool chain or as a plug-in to CodeWarrior

We use PilRC in our examples because it’s cross-platform (works with both PRC-Tools and CodeWarrior), and it’s easy to show the textual resource declarations in this book (as opposed to many screen dumps from Constructor).

Creating Resources in PilRC

PilRC is a resource compiler that takes textual descriptions (stored in an .rcp file) of your resources and compiles them into the binary format required by a .prc file. Unlike Constructor, PilRC doesn’t allow you to visually create your resources; instead, you type in text to designate their characteristics. ...

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