hmmmmm..... that didnt work... i changed my draw function to look like this
:
void ProjectListDrawFunction(UInt itemNum,RectanglePtr bounds,CharPtr
pUnused)
{
project_rec prec;
CharPtr pname;
DBOpen();
if(GetProjectRec(itemNum,&prec)!=-1)
{
pname=MemPtrNew(StrLen(prec.Name)+1);
StrCopy(pname,prec.Name);
}
else
{
pname=MemPtrNew(StrLen("Error getting project name")+1);
StrCopy(pname,"Error getting project name");
}
WinDrawChars(pname,StrLen(pname),bounds->topLeft.x,bounds->topLeft.y);
DBClose();
return;
}
BUT... displaying the list isnt the problem!... the list display's just
fine.... and all the strings in it looks fine too!
the problem occurs when i select something from the list!... And it doesnt
matter if i handle the event myself, or i leave it up to the OS...
Any other suggestions ?
Jimmy
>-----Original Message-----
>From: McMicken, Steven [mailto:[EMAIL PROTECTED]]
>Sent: 18. februar 2000 18:06
>To: Palm Developer Forum
>Cc: '[EMAIL PROTECTED]'
>Subject: RE: Dynamic popup list weirdness (long)
>
>
>You need to allocate space for your CharPtr using pname = MemPtrNew (xx),
>where xx is the size you want to allocate. Right now, you don't have any
>space allocated to receive the string, thus the bus error.
>
>Regards,
>
>Steve
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html