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/