The standard code routines found in every Palm application
All about the application’s lifecycle—its starting, running, and closing
How the application processes each event and hands it off to the appropriate manager
How memory is organized on a Palm device; how the application can use it
All the times that an application needs to be available to the system and how these instances are handled in the code
Like every operating system and coding interaction, the Palm OS has it own set of necessary terminology for you to learn. Much of it may already be familiar to you from other applications you have written. We suggest that you skim through this list and concentrate on the items that are new to you. New and unique terminology is listed first.
An application window (what many people would think of as a view) that usually covers the entire screen. A form optionally contains controls, text areas, and menus. In a Palm OS application, there is only one active form allowed at a time. Chapter 5, covers forms in detail.
A rectangular area in which things like dialogs, forms, and menus are drawn by the application. The Window Manager makes sure that windows properly display relative to each other (for example, it has the ability to restore the old contents when a window is closed). Note in a rather Shakespearian twist of logic that all forms are windows, even though all windows are not forms.
A piece of data stored in a resource database. Each resource is identified by a resource type and number. A Palm application is a collection of resources. Section 5.1 covers resources in more detail.
A data structure that describes things that happen in an application. Events can be low-level hardware events like a pen down, pen up, or hardware key press. They can also be higher-level events like a character entered, a menu item selected, or a software button pressed.
The Palm OS is an event-driven system. Only one application is open at a time. When that application is running, it runs an event loop that retrieves events and continues to handle them until the user starts another application.
- Main event loop
- Launch code
A parameter passed to an application that specifies what the application should do when that particular launch code is executed. An application typically handles more than one launch code. This is the communication method used between the OS and an application and between applications.
Menus are stored in resources grouped together into menubars and are displayed when the user taps the menu area. See Chapter 7, for more details.
These brief descriptions cover the most important terminology. In the following section, we look at the basic elements of a very small Palm OS application.