I am using the following code to determine the listitem selected from a pop 
up list and then want to display the selected item in the pop up label.  I am 
getting trash back when the function: LstGetSelectionText is called.  Can 
someone help me on this one,  I dont know why garbage is being returned.  



  case popSelectEvent:
            switch (event->data.popSelect.listID)
            {
            case ShipToPOP_SHIPTOList:
                        
                listIndex = event->data.popSelect.selection;
                
                MemSet(pszSelect, 30, '\0');
                if (listIndex != noListSelection)
                {
                    if ( (LstGetSelectionText(event->data.popSelect.listP, 
listIndex ))                      
                                                    == NULL)
                        PalmMessageBox (DebugAlertAlert, "Error selecting 
text,            
                                                              please 
reselect");
                    else
                       StrCopy(pszSelect, LstGetSelectionText(
                                                   
event->data.popSelect.listP, listIndex ));
               
      
                    //set the selected text to the popup label
                    CtlSetLabel(event->data.popSelect.controlP, pszSelect);
                }
                handled = true;
                break;

Reply via email to