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.
s
: Pointer to a string of size maxStrIToALen
in which to store the results
i
: Integer to convert
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.
fldP
: Pointer to a field object (FieldType structure)
textHandle
: Unlocked handle of a field's text string
FldDrawField( fld );
The function void FldDrawField( FieldType *fldP ) draws the text of the field.
fldP
: Pointer to a field object (FieldType structure)
The field's usable
attribute must be true
or the field won't be drawn.