At 04:13 PM 8/29/2002 +0800, you wrote:
>I have done the following changes, but I'm still having problems. This is 
>what I have change:
>
>    case ctlSelectEvent:
>    switch (eventP->data.ctlSelect.controlID) {
>
>    case MainOkButton:
>    {
>    UInt16 formID = 0;
>
>    switch(LstGetSelection(eventP->data.ctlSelect.pList)) // Error here

Right... you're reacting to a press of the OK button, and you no longer 
have the list pointer you had when the popSelectEvent came through.  There 
is no pList member of a ctlSelect event.  You need to write code, like

ListType *listP = (ListType *)FrmGetObjectPtr(FrmGetActiveForm(), 
MainSelectList);
switch (LstGetSelection(listP))

>    {
>    case 0: formID = Form1Form;
>            break;
>    case 1: formID = Form2Form;
>            break;
>    case 2: formID = Form3Form;
>            break;
>    case 3: formID = Form4Form;
>            break;
>    case 4: formID = Form5Form;
>            break;
>    case 5: formID = Form6Form;
>            break;
>    }
>    if (formID)
>    FrmGotoForm(formID);
>    handled = true;
>    break;
>}
>
>When I try to compile, a error appears which says: 'pList' is not a 
>struct/union/class member. I think there's a problem with the ListType and 
>pointer to the list object at LstGetSelection. Can some1 clarify my doubts 
>pls? Thanks.



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

Reply via email to