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.
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).
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).
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 ...
Get Palm Programming: The Developer's Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.