Hey, I asked Palm what the official way to do this was, and I was told
whichever way works ;)
What you attached is fine -- the form will deallocate when the form is
destroyed. However, whatever you had attached before your call to
FldSetTextHandle is floating in memory. You should get a pointer/handle to
the existing field info, set the new handle to the field, than deallocate
the pointer/handle you grabbed.
Elia
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 04, 1999 1:18 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Help with set focus
Here is a related question: I allocate some memory for the field
handle. When should I release it or is this handled
automatically?
nameH = MemHandleNew(stringMaxLen + 1); // ** WHEN deallocate THIS
nameP = MemHandleLock(nameH);
StrCopy(nameP, oldstr);
MemHandleUnlock(nameH);
FldSetTextHandle(pField, nameH);
...
Thanks,
Brad Myers