> > 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);
>
> If you want to delete all of the text, use:
>
> FldDelete(debugFldP, 0, FldGetTextLength(debugFldP));
>
> In your code, you're trying to delete the terminating null, which
> could cause problems, depending on which version of the ROM you're
> using. The field code assumes that if there's field text, then it has
> a null at the end.

I had not thought of that one. But are you suggesting that FldDelete is an
*appropriate* way to clear a text field?


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to