The default selection of a list is always 0, unless you set it to something
else (either in code or by selecting something in the list in the UI). You'd
have to use LstSetSelection(pList, noListSelection); to disable the default
selection.
JB @ PalmSource
on 10/15/02 1:35 PM, Preston James at [EMAIL PROTECTED] wrote:
> Im trying to check to see if a selection is made from a list however even if
> one is not selected it still returns a index of 0... from examples it seems
> it should return noListSelection. Whats the deal???
>
> FormPtr form;
>
> ListType * lstCircuitVoltagePtr;
>
> form = FrmGetActiveForm();
>
> lstWireTypePtr = FrmGetObjectPtr(form, FrmGetObjectIndex(form,
> lstWireType));
>
> Int16 lstWireTypeSelection = LstGetSelection(lstWireTypePtr);
>
> Char * lstWireTypeText = LstGetSelectionText(lstWireTypePtr
> ,lstWireTypeSelection);
>
> if(lstWireTypeSelection != noListSelection){
>
> //Rest Of Function
>
> }
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/