From: "James Tu" <[EMAIL PROTECTED]>
> FieldPtr debugfldP;
> CharPtr debug_text;
>
> //The field is a non-editable field
> //This Causes an error "MemoryMgr.c, Line: 4340, NULL handle" for some
> reason!!!
>
> debugfldP = GetObjectPtr(MainDebugFieldField);
> debug_text = FldGetTextPtr(debugfldP);
> if (debug_text != NULL){
> FldDelete(debugfldP, 0, StrLen(debug_text) + 1);
> }
The second param to FldDelete is the offset into the field's text string of
the start of the range, and the third param is the offset of the end of the
range. I haven't tested this, but I think that makes StrLen(debug_text)+1
is too big. (E.g., to delete all of a 3 char text field, I think you would
use 0 and 2, not 0 and 3). Also, if your Palm supports multi-byte
characters, you have to account for the fact that one character may take 2
bytes.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/