Slide 9.8: Line-by-line anatomy of Menu.c (cont.) (cont.)
  Slide 10.1: Programming Exercise II: my memento by using Palm OS
  Home


Line-by-line Anatomy of Menu.c (Cont.)


objType = FrmGetObjectType( frm, focus );
This function FormObjectKind FrmGetObjectType( const FormType *formP, UInt16 objIndex ) returns the type of an object.
return( TblGetCurrentField( FrmGetObjectPtr( frm, focus ) ) );
This function FieldPtr TblGetCurrentField( const TableType *tableP ) returns a pointer to the FieldType in which the user is currently editing a text item, or NULL if the table is not in edit mode.
StrPrintF ( cursor, "%2d/%-2d", curRec+1, MAX_REC );
This function Int16 StrPrintF( Char *s, const Char *formatStr, ... ) implements a subset of the ANSI C sprintf call, which writes formatted output to a string. It returns number of characters written to destination string, or returns a negative number if there is an error.
StrCopy( p, str );
This function Char *StrCopy( Char *dst, const Char *src ) copies one string to another. Use this function instead of the standard ANSI C strcpy routine.