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


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


p = (CharPtr) MemHandleLock( h );
The function MemPtr MemHandleLock( MemHandle h ) locks a chunk and obtains a pointer to the chunk's data.
StrIToA( p, cnt );
The function Char *StrIToA( Char *s, Int32 i ) converts an integer to ASCII.
MemHandleUnlock( h );
This function Err MemHandleUnlock( MemHandle h ) unlocks a chunk given a chunk handle.
FldSetTextHandle( fld, (Handle) h );
The function void FldSetTextHandle( FieldType *fldP, MemHandle textHandle ) sets the text value of a field to the string associated with the specified handle. Does not update the display.
FldDrawField( fld );
The function void FldDrawField( FieldType *fldP ) draws the text of the field. The field's usable attribute must be true or the field won't be drawn.