Hello.
I have this code in my app, but using the debug rom, in the line where I
call FldDrawField, I get an error saying that�s no valid DrawWindow for
something to be drawn.
The function is the following:
FieldPtr SetFieldTextFromHandle( UInt16 fieldID, MemHandle txtH )
{
MemHandle oldTxtH;
FormPtr frm = FrmGetActiveForm( );
FieldPtr fldP;
// get the field and its text MemHandle
fldP = FrmGetObjectPtr( frm, FrmGetObjectIndex( frm, fieldID ) );
ErrNonFatalDisplayIf( !fldP, "Missing field" );
oldTxtH = FldGetTextHandle( fldP );
// set field to new text
FldSetTextHandle( fldP, txtH);
FldDrawField( fldP );
// free old MemHandle
if ( oldTxtH ) MemHandleFree( oldTxtH );
FldSetDirty(fldP, true);
return fldP;
} // SetFieldTextFromHandle
Any suggestions would be very helpful.
Thanks for your attention,
Christiano.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/