Chapter 2 - The Palm OS

The Palm OS handles issues relating to user interface, database management, and communication among other things. The User Interface Application Shell (UIAS) is responsible for managing applications and runs one application at a time by calling a function PilotMain. The Palm OS has a pre-emptive multitasking kernel so for instance, a hot sync operation can be pre-empted by a higher priority user interface task such as a "cancel the hot sync operation."

The Palm OS applications that we will be writing are event-driven in nature meaning that events are received by the OS and either handled in the application or given back to the OS to be handled. An example of an event might be a "stylus tap." The event contains not only what event occurred but information relating to that event such as where on the screen the tap happened in the case of the "stylus tap." A normal lauch of an application causes execution to pass to the applications event loop which gets events from the event queue. Each event from the queue is handled according to the type of even.

Most events are handled by the OS because they are events such as button pressed, or display menu, ... If the event is not handled by the OS, then they are passed to the applications event handler which handles them or gives them back to the event loop.

A typical Palm app remains in the event loop until a close application event happens.

Let's begin taking a look at some Palm code to get the idea of event-driven programming. Most of this will not make any sense to you right now, but don't be concerned!!!

Starter Palm Application


© Douglas J. Ryan / ryandj@pacificu.edu