"Walter Black" <[EMAIL PROTECTED]> wrote in message
news:17293@palm-dev-forum...
>
> Hello All,
> I'm attempting to use the following code but I get an error when I free
the
> memory.  What am I doing wrong?
>
> CharPtr typeP;
> ListPtr listP;
> typeP = MemPtrNew(10);
> listP = GetObjectPtr(DetailEntryTypePopupList);
> typeP = LstGetSelectionText(listP, LstGetSelection(listP));

this line replaces the pointer in typeP with the one returned by
LstGetSelectionText... instead you need

StrCopy(typeP, LstGetSelectionText(listP, LstGetSelection(listP)));

to copy the string out of the list selection and into your allocated buffer.




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

Reply via email to