>     newText = MemHandleLock(newHandle);
>     StrCopy(newText,recText);
>    MemHandleUnlock(newHandle);

At this point, newText is no longer guaranteed to be valid; an unlocked
handle can have its data moved at any time.  (So, you shouldn't unlock it
yet since you still want a pointer to it.)


>  WinDrawChars(testTxt,20,bounds.topLeft.x,bounds.topLeft.y);
>

And now you're drawing testTxt, which is a variable that you haven't ever
mentioned before.  Did you mean to use the variable newText instead?  If
you don't unlock the handle, and use newText here (and StrLen(newText)) it
should work fine.

-David Fedor
Palm Developer Support


Reply via email to