>  > > 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.

Recent versions of the field code try to catch/correct this 
situation, though they ought to be tossing up a non-fatal alert as 
well. There might be a bug in this correct code, though - I haven't 
walked it recently.

BTW, any time you've got a fatal alert problem that you're reporting, 
it's very useful to include the ROM version number.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

-- 
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