>  lblP = (Char*)CtlGetLabel(ctlP);
>  StrCopy(lblP, LstGetSelectionText(lstP,LstGetSelection(lstP)));
I'll bet lblP is not large enough to hold the selection.  Make sure you
specify the max # of characters you expect to load into the label when you
create it with Constructor (or allocate enough memory to the pointer, plus
one for the string terminator)

----- Original Message -----
From: "christy" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, December 09, 2002 3:10 PM
Subject: Re: pop-up list


> Here is my code for popSelect event. Could you please
> help me to identify where the problem is:
> .
> .
> .
> ListPtr lstP = FrmGetObjectPtr(frmP,
>  FrmGetObjectIndex(frmP, MainLstList));
> ControlPtr ctlP = FrmGetObjectPtr(frmP,
>  FrmGetObjectIndex(frmP, MainPopTrigger));
> Char * lblP;
> .
> .
> .
> case popSelectEvent:
>  lblP = (Char*)CtlGetLabel(ctlP);
>  StrCopy(lblP, LstGetSelectionText(lstP,
> LstGetSelection(lstP)));
>  CtlSetLabel(ctlP, lblP);
>  handled = false;
>  break;
>




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

Reply via email to