Advanced Palm OS Programming

Advanced Palm OS Programming

Wen-Chen Hu (University of North Dakota, USA)
DOI: 10.4018/978-1-59140-769-0.ch014
OnDemand PDF Download:
$37.50

Abstract

The introduction to Palm OS programming given in the previous chapter provided an overview of its structure and basic concepts. This chapter examines an advanced aspect of Palm OS programming, focusing on one major subject that is particularly relevant for handheld devices: forms. User interfaces such as check boxes and radio buttons can be contained in a form, allowing users to enter data that is, typically, then sent to a server for processing. It is important to note that this topic was selected to allow the reader to become familiar with how Palm OS operates; for other Palm OS topics such as databases and menus, readers may check the section later in this chapter on Palm OS References for further information. • In Palm OS, every file is a database, which is similar to the persistent storage of J2ME. A Palm database does not correspond to a “relational database” but is actually closer to a structured, flexible, and mobile binary data file. • A menu bar is displayed whenever the user taps a menu icon. The menu bar is also displayed when the user taps in a form’s titlebar. The menu bar, a horizontal list of menu titles, appears at the top of the screen in its own window, above all the application windows.
Chapter Preview
Top

Introduction

The introduction to Palm OS programming given in the previous chapter provided an overview of its structure and basic concepts. This chapter examines an advanced aspect of Palm OS programming, focusing on one major subject that is particularly relevant for handheld devices: forms. User interfaces such as check boxes and radio buttons can be contained in a form, allowing users to enter data that is, typically, then sent to a server for processing. It is important to note that this topic was selected to allow the reader to become familiar with how Palm OS operates; for other Palm OS topics such as databases and menus, readers may check the section later in this chapter on Palm OS References for further information.

  • In Palm OS, every file is a database, which is similar to the persistent storage of J2ME. A Palm database does not correspond to a “relational database” but is actually closer to a structured, flexible, and mobile binary data file.

  • A menu bar is displayed whenever the user taps a menu icon. The menu bar is also displayed when the user taps in a form's titlebar. The menu bar, a horizontal list of menu titles, appears at the top of the screen in its own window, above all the application windows.

Top

Forms

This section is divided into three sub-sections:

  • 1.

    Screenshots of execution results of the application Forms are given first to illustrate how the application is used before the programming details are discussed.

  • 2.

    User interface construction using Palm Resource Editor is then shown.

  • 3.

    Finally, the Palm C program is given and explained line by line.

Execution Results of the Application Forms

The following emulator screenshots show the interfaces generated by the application Forms, which displays various kinds of user interface that may be contained in forms:

  • Figure 1 shows the default Palm Applications interface with a new icon Forms. The icon was created by the project Forms, which will be discussed later. Note that the default icon is replaced by the image . The interface changes to the one shown in Figure 2 after the Forms icon is clicked.

    Figure 1.

    The default Palm Applications interface including a new icon Forms

  • Figure 2 shows the first interface of the application Forms, which includes various (disabled) buttons with/without (bold) frames. The interface changes to the interfaces shown in Figures 3 and 1 after the Next and Exit buttons are clicked, respectively.

    Figure 2.

    The first interface of the application Forms including various buttons

  • Figure 3 shows the second interface of the application Forms, which includes grouped push buttons and (grouped) checkboxes. The interface changes to the interfaces shown in Figures 2, 4, and 1 after the buttons Prev, Next, and Exit are clicked, respectively.

    Figure 3.

    The second interface of the application Forms including grouped push buttons and checkboxes

  • Figure 4 shows the third interface of the application Forms, which includes a list, repeat buttons and field, and a bitmap image. The interface changes to the interfaces shown in Figures 3 and 1 after the buttons Prev and Exit are clicked, respectively.

    Figure 4.

    The third interface of the application Forms including a list, repeat buttons and field, and a bitmap image

  • Figure 5 displays a help message for the application Forms reached by clicking on the letter ‘i’ in the top-right corner of each of the screens in Figures 2-4. The interface changes to the one shown in Figure 14.4 after the button Done is clicked.

    Figure 5.

    A help message for the application forms

Figure 14.

The push buttons in Form 1001

Complete Chapter List

Search this Book:
Reset