Thanks one more time, It works in my project...
Sergio -----Original Message----- From: Morten Schmidt [mailto:[EMAIL PROTECTED] Sent: quarta-feira, 28 de abril de 2004 10:39 To: Palm Developer Forum Subject: Re: Erase Field sorry, bad structure, this is are bit easier to read... (I hope) void *GetObjectPtr(UInt16 ownerForm, UInt16 fieldName) { return FrmGetObjectPtr(FrmGetFormPtr(ownerForm), FrmGetObjectIndex(FrmGetFormPtr(ownerForm),fieldName)); } void SetEditText(UInt16 ownerForm, UInt16 fieldName,Char *text) { FieldPtr THIS = GetObjectPtr(ownerForm, fieldName); MemHandle h,old; Char *dest; if( text == NULL ) text = ""; h = MemHandleNew( StrLen( text ) + 1 ); dest = MemHandleLock( h ); StrCopy( dest, text ); MemHandleUnlock( h ); old = FldGetTextHandle( THIS ); FldSetTextHandle( THIS, h ); if( old != NULL ) MemHandleFree( old ); FldDrawField(THIS); } Char* GetEditText(FieldPtr THIS) { Char *text; text=FldGetTextPtr(THIS); if (!text) text=""; return text; } "Morten Schmidt" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > What are you trying to do? Set the text to "" in the field or? > > /morten > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
