> The FldDelete needs s pointer to a FieldType structure...not the actual
> text.
you are right. I was thinking of something else.
> > > 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);
> > > }
I think the problem is that you are making the field text pointers
point to empty strings, rather than setting them to NULL.
a simpler solution for what you are trying to do is:
FieldPtr debugfldP;
Handle debugfldH;
debugfldP = GetObjectPtr(MainDebugFieldField);
debugfldH = FldGetTextHandle(debugfldP);
if(debugfldH){
FldSetTextHandle(debugfldP, NULL);
MemHandleUnlock(debugfldH);
}
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/