Skip to Main Content
Palm OS Programming, 2nd Edition
book

Palm OS Programming, 2nd Edition

by Julie McKeehan, Neil Rhodes
October 2001
Intermediate to advanced content levelIntermediate to advanced
704 pages
19h 33m
English
O'Reilly Media, Inc.
Content preview from Palm OS Programming, 2nd Edition

Adding Menus to the Sample Application

Now it is time to add the menus to our Sales application. The menu bars are added first. Next, we set up our definitions for our menu items and menu bars. Once these are in place, we can create our code to handle common menu items and the functions we need to handle our forms. Our last step is to make sure the main event loop in our application calls our menu-handling function correctly.

The Menu Bars

The application has five menu bars, the first of which contains the Record, Edit, and Options menus (Figure 11-11). This menu bar is for the Order form. The Send Customer menu item is added dynamically on a 4.0 device.

The Order menus on a 4.0 or later device

Figure 11-11. The Order menus on a 4.0 or later device

The second menu bar, DialogWithInputField, is used for dialog boxes that have textual input fields (see Figure 11-12). It contains just one menu, the Edit menu.

The menu bar for dialog boxes with input fields

Figure 11-12. The menu bar for dialog boxes with input fields

The third and fourth menu bars are used separately, depending on whether the application is running on a 4.0 or earlier device. As you can see in Figure 11-13, the difference is whether sending shows up as a menu item. We have different menus for different devices so that a pre-4.0 user doesn’t get confused about either the application’s or device’s capability. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Palm OS Network Programming

Palm OS Network Programming

Greg Winton
Palm Programming: The Developer's Guide

Palm Programming: The Developer's Guide

Neil Rhodes, Julie McKeehan

Publisher Resources

ISBN: 1565928563Errata Page