O'Reilly logo

Palm Programming: The Developer's Guide by Julie McKeehan, Neil Rhodes

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

Forms

As we discussed earlier, a form is a container for the application’s visual elements. A form is created based on information from a resource (of type “tFRM”) that describes the elements. There are both modal and modeless forms in an application. The classic example of a modal form is an alert. Other forms can be made modal but require extra work on your part.

Note

A modal dialog is different from a modeless form in:

  • Appearance: a modal dialog has a full-width titlebar with the title centered and with buttons from left to right along the bottom. Most modal dialogs should have an info button that provides additional help.

  • Behavior: the Find button doesn’t work while a modal dialog is being displayed.

In the following material, we first discuss alerts and then modal forms. We also offer several tips in each section.

Alerts

An alert is a very constrained form (based on a “Talt” resource); it is a modal dialog with an icon, a message, and one or more buttons at the bottom that dismiss the dialog (see Figure 5.6). As we discussed in Chapter 3, there are four different types of alerts (information, warning, confirmation, and error). The user can distinguish the alert type by the icon shown.

An alert showing an icon, a message, and a button

Figure 5-6. An alert showing an icon, a message, and a button

The return result of FrmAlert is the number of the button that was pressed (where the first button is number 0).

Customizing an alert ...

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