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

Adding Menus to the Sample Application

Now it is time to add the menus to our Sales application. The menubars are added first. Next, we set up our definitions for our menu items and menubars. Once that is 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 correctly calls our menu-handling function.

The Menubars

The application has five menubars, the first of which is shown in Figure 7.14. This menubar is for the Order form, which contains the menus Record, Edit, and Options.

The Order menubar on a pre-3.0 device

Figure 7-14. The Order menubar on a pre-3.0 device

The second menubar is like the first, but has a Beam Customer item at the end of the Record menu (see Figure 7.15).

The Order menubar on a 3.0 or later device

Figure 7-15. The Order menubar on a 3.0 or later device

The third menubar, DialogWithInputField, is used for dialogs that have textual input fields (see Figure 7.16).

The menus for dialogs with input fields

Figure 7-16. The menus for dialogs with input fields

The fourth and fifth bars are used separately, depending on whether the application is running on a 3.0 or earlier device. As you can see in Figure 7.17, the difference is whether beaming shows up as a menu item. We ...

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