Chapter 1. Tutorial: Creating a Simple Palm OS Application (revised August, 2002)

Table of Contents
1.1. POSE
1.1.1. Getting and Installing POSE
1.1.1.1. Windows and Mac OS
1.1.1.2. Unix
1.1.1.3. Emulator Skins
1.1.2. POSE and ROM Images
1.1.3. Retrieving A ROM from a handheld
1.1.3.1. Windows
1.1.3.2. Mac OS
1.1.3.3. Unix
1.1.4. Creating a new POSE session
1.1.4.1. Windows and Unix
1.1.4.2. Macintosh
1.2. CodeWarrior
1.2.1. What CodeWarrior Includes
1.2.2. Installing 4.0 SDK
1.2.2.1. Windows and Mac OS
1.2.2.2. Installing Additional Examples
1.2.3. Installing PilRC Plugin
1.2.4. Installing OReilly Stationery
1.2.5. CodeWarrior Setup
1.2.5.1. Windows
1.2.5.2. Mac OS
1.2.5.3. Launching POSE automatically
1.2.6. Multi-File Searching
1.2.7. Creating a new project
1.2.8. CodeWarrior IDE
1.2.8.1. The Project Window
1.2.8.2. The Project Settings
1.2.9. Constructor for Palm OS
1.3. PRC-Tools
1.3.1. What PRC-Tools includes
1.3.2. Installing on Windows
1.3.3. Installing On x86 RPM-based Linux
1.3.4. Installing On Mac OS X
1.3.5. Installing On Unix
1.3.5.1. Installing PRC-Tools
1.3.5.2. Installing the 4.0 SDK
1.3.5.3. Installing PilRC
1.3.6. Installing OReilly sample project
1.3.7. Cloning the Sample Project
1.3.8. Customizing the output file
1.3.9. A non-debug build
1.4. Installing PRC on Handheld
1.4.1. Using Windows
1.4.2. Using Mac OS
1.4.3. Using Unix
1.5. Installing PRC on POSE
1.5.1. Get Your ROM Image
1.5.2. Installing the Sample Application
1.6. Modifying the Sample Application
1.6.1. Change the Application Name
1.6.2. Change the Location of a Button
1.6.3. Registering creator ID and setting appropriately
1.6.3.1. Changing the Creator ID in CodeWarrior
1.6.3.2. Changing creator ID in PRC-Tools
1.6.4. Add a second button that beeps

You have learned all about development environments, design issues, and the Palm platform and now it's time to put all that knowledge to work. With our help, you are going to create, build, and download a simple Palm OS application. The good and bad news is that we are going to walk you through this process step-by-step. It's good news because a good programmer, new to the platform, can often use just this type of help. It's bad news because it involves telling you how to use a bunch of different tools and development environments that have their own release cycles that will most likely obsolete much of what we tell you within 6 months.

The software tools discussed here are those versions current as of August, 2002. Each discussion of a tool will include its version number. As newer versions of tools are made and installations procedures change, we'll update the relevant sections of this chapter online.

Thus, the first thing you should do before reading the printed version of this chapter is to go to our website (www.calliopeinc.com/palmprog2) to see whether there are newer instructions.

There are two things everybody needs to do in this chapter:

  1. Read about how to install and run the Palm OS Emulator (POSE), and how to run your application on it.

  2. Chose an environment and read the tutorial for it. The two development environments you can choose between are:

    • CodeWarrior

    • PRC-Tools

    Read the material in that tutorial and feel free to ignore the other. Each tutorial tells you how to:

    • build an executable Palm application (a PRC file)

    • make changes to the application (in both the source code and the resources)

    • rebuild the application

    This chapter won't cover how to use the debuggers from these environments; that's covered in Chapter 7, Debugging Palm Applications.

The development platforms that are covered in our discussion of POSE and each tutorial are shown in Table 4-1:

Table 1-1. Development Tools and Platforms

 Windows 95/NTMac OSUnix
POSE
CodeWarrior 
PRC-Tools 

We will always cover each platform in the following order: Windows, Mac OS, and Unix. This chapter won't cover how to use the debuggers from these environments; that's covered in Chapter 7, Debugging Palm Applications.