Hi All,
I'm facing with the problem:when I access the text
of selected item in popup-list,I receive the garbage
value,my code in the case is the following:
char pszSelect[255];
//UInt
uiIndex=eventP->data.popSelect.selection;
//LstGetSelection() uses FrmGetObjectPtr()() to
receive pointer to list
Word uiIndex=LstGetSelection(pListSelect2);
//Only test
CharPtr suiIndex="";
StrIToA(suiIndex,uiIndex);
FrmCustomAlert
(TestValueAlert,"uiIndex",suiIndex,"");
//StrCopy(pszSelect,"test");
StrCopy(pszSelect,LstGetSelectionText(pListSelect2,uiIndex));//For
the error
FrmCustomAlert(TestValueAlert,"pszSelect",pszSelect,"");
CtlSetLabel((ControlPtr)pPopupList2,pszSelect);
When I use FrmCustomAlert() to debug the value of
variable:I see that:variable uiIndex is
correct(position of selected item in list),however
when I use LstGetSelectionText() to get the text at
position uiIndex above,I receive garbage value.
Please help me in this case,
Thanks any responses,
Trinh
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/