Slide 8.3: Forms (cont.)
  Slide 8.5: Line-by-line anatomy of Forms.c (cont.)
  Home


Line-by-line Anatomy of Forms.c


#include <PalmCompatibility.h>
Note that some header file names and the names used for basic types have changed in a legacy application with the Palm OS 3.5 or later SDK. For example, parameters previously declared as Word are now UInt16 or Int16. To compile existing applications, need to make these changes in your code or include the header file PalmOSCompatibility.h.

case ctlRepeatEvent:
When the control routine CtlHandleEvent( ) receives a ctlEnterEvent in a repeating button (tREP), it sends a ctlRepeatEvent. When CtlHandleEvent receives a ctlRepeatEvent in a repeating button, it sends another ctlRepeatEvent if the pen remains down within the bounds of the control for 1/2 second beyond the last ctlRepeatEvent. If you return true in response to a ctlRepeatEvent, it stops the ctlRepeatEvent loop. No further ctlRepeatEvents are sent. For this event, the data field contains the following structure:
   struct  ctlRepeat {
     UInt16  controlID;
     struct  ControlType  *pControl;
     UInt32  time;
     UInt16  value;
   }  ctlRepeat;

obj = FrmGetObjectIndex( frm, Form3Count );
This function UInt16 FrmGetObjectIndex( const FormType *formP, UInt16 objID ) returns the index of an object in the form's objects list or frmInvalidObjectId if the supplied object ID is invalid.