Does the Palm OS know to free the chunk itself when the control is unloaded?
Regards,
Alan Ingleby
"Peter Epstein" <[EMAIL PROTECTED]> wrote in message
news:40235@palm-dev-forum...
>
> At 10:40 AM 2/19/2001, Matt Mason wrote:
> >When I change the label on a popup trigger with this:
> >{
> > CharPtr s = MemPtrNew(sizeof(char[MAX_ITEM_PRICE_SIZE]));
> > MemSet(s,MAX_ITEM_PRICE_SIZE,0);
> > s = StrIToA(s,qty);
> >CtlSetLabel(GetObjectPtr(ItemEditQtyPopTrigger),s);
> > MemPtrFree(s);
> >}
> >and then try to use the popup trigger on the form, I get an error reading
> >from an unallocated chunk.
> >
> >What am I doing wrong?
>
> You're freeing the chunk too soon. The form needs to be able to read from
this chunk to display the label. That means the chunk needs to stick around
until the form is closed.
> --
> Peter Epstein
> Palm Inc. Developer
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/