Slide 10.19: Line-by-line anatomy of DB.c (cont.)
  Slide 11.1: WML (Wireless Markup Language)
  Home


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


if ( recH = (MemHandle) DmGetRecord( db, curRec ) )
This function MemHandle DmGetRecord( DmOpenRef dbP, UInt16 index ) returns a handle to a record by index and mark the record busy.
CtlGetValue( ctl )
This function Int16 CtlGetValue( const ControlType *controlP ) returns the current value of the specified control. For most controls, the return value is either 0 (off) or 1 (on). CtlSetValue(ctl, value);
This function void CtlSetValue( ControlType *controlP, Int16 newValue ) sets the current value of the specified control. If the control is visible, it's redrawn. FldGetTextPtr( fld );
This function Char *FldGetTextPtr( const FieldType *fldP ) returns a locked pointer to the field's text string or NULL if the field is empty. The pointer returned by this function can become invalid if the user edits the text after you obtain the pointer. Do not modify the contents of the pointer yourself. If you change the text while it is being used by a field, the field's internal structures specifying the text length, allocated size, and word wrapping information can become out of sync.