I assume that this code was copied and pasted to your message verbatim? Look
at the first line very closely.

MemHandle newText = MemHandleNew(maxStrIToALen), oldText;

Isn't that the same as saying:

MemHandleNew(maxStrIToALen);
MemHandle newText = oldText;
??

Is that really what you want to do?


"cfaun" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> A program I wrote works fine on Palms with palm OS 4.0 but with palms with
> palm OS 4.5, I get a Fatal Alert with:
>
> MemoryMgr.c, Line 2696,
> MemMove to NULL
>
> Does anyone know what may be the problem?
>
> Any help would be greatly appreciated
>
> I doubt anyone would need this, but as insurance for flames about needing
> more information, the only code that directly calls any Memory Manager
> functions is the following:
>
>     MemHandle newText = MemHandleNew(maxStrIToALen), oldText;
>     Char *numb_str = (Char*)MemHandleLock(newText);
>     StrIToA(numb_str, number); //error checking not neccessary in this
case
>     FldCompactText(field);
>     oldText = FldGetTextHandle(field);
>     MemHandleResize(newText, StrLen(numb_str)+1);
>     MemHandleUnlock(newText);
>     FldSetTextHandle(field, newText);
>     if (oldText != NULL)
>         MemHandleFree(oldText);
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to