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

Form Events

There are five form-level events sent by the Form Manager to an application:

frmLoadEvent

This specifies that a form needs to be loaded. While there is no default handling for this event, this is certainly the event for which your application-wide event handler is looking (see Chapter 5). In response to this event, the event handler must do the following:

  • Initialize the form

  • Make it the active form

  • Install an event handler for it

frmOpenEvent

This specifies that a form is being opened. There is no default handling for this event. Your form-specific event handler needs to draw the form (after initializing any form objects that it desires).

Warning

Do not do any drawing to the screen before calling FrmDrawForm (the 3.5 or later debug ROMs will cause an error if you try). You may do initialization of form objects, which will then draw with their new values when the form itself draws. Since the bits underneath for the form are saved on the first FrmDrawForm (see Section 8.2 earlier), you don’t want to do any drawing before that, or the wrong bits will be saved.

frmCloseEvent

This is sent when a form is being closed. The default handling for this event is to erase the form (restoring the bits underneath, if Save Behind is set), and delete it from memory. You’ll often want to look for this event so as to undo the effects of any initialization you did on the frmOpenEvent (e.g., deallocate allocated memory). You’ll still want to return false from your event handler, however, ...

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