Could someone tell me what I'm doing wrong? Here is the code, it's in the AppHandleEvent routine. The error appears not when the meat of the following code runs, but when the form is displayed (FrmDoDialog()).
----------------------------------------------------------- FormType* pForm; UInt16 whichbutton; MemHandle textH; FieldType *fieldP; char *textP;
// global search1 contains initial string
pForm = FrmInitForm(NewSearchForm);
fieldP = FrmGetObjectPtr(pForm, FrmGetObjectIndex(pForm,
Search1Field));
textH = MemHandleNew(100); // changing this size doesn't help
textP = (char *)MemHandleLock(textH)
if (textP)
{
StrCopy(textP, search1);
MemHandleResize(textH, StrLen(textP)+1);
MemHandleUnlock(textH);
FldSetTextHandle(fieldP, textH);
}
MemHandleFree(textH);
whichbutton = FrmDoDialog(pForm);
etc.
---------------------------------------------------------------I appreciate any guidance.
thanks,
Curtis Cameron
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
