Change "eventP->data.ctlSelect.pList"
To "eventP->data.lstSelect.pList"

Brian

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Ben
Sent: Thursday, August 29, 2002 4:13 AM
To: Palm Developer Forum
Subject: RE: Switching forms using popup triggers


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
   {
   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.             

Note: My listID is 

-----Original Message-----
From:   "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> on behalf of      "Ludovic
Ferrandis" <[EMAIL PROTECTED]>
Sent:   Wednesday, August 28, 2002 6:33 PM
To:     "Palm Developer Forum" <[EMAIL PROTECTED]>
Posted To:      palm-dev-forum
Subject:        Re: Switching forms using popup triggers

You don't need to do something in the popSelect event.

When the user tape on the OK button, get the selected item in you list 
and call FrmGotoForm

case ctlSelectEvent:
switch(eventP->data.ctlSelect.controlID)
{
   case YourOKButtonID:
   {
      UInt16   formID = 0;

      switch(LstGetSelecetion())
      {
         case 0:  formID = xxxx; break;
         case 1:  formID = zzzz; break;
      }
      if (formID)
         FrmGotoForm(formID);
   }
}

Put the handled = true/false where it's needed.

You could use array of formID, other algo....

Hope this help.

Ludovic

In article <94491@palm-dev-forum>, "Ben" <[EMAIL PROTECTED]> 
wrote:

> I'm currently using CW 7.0 to do a simple application which use 
> involves
> switching of forms using popup triggers. After selecting the item from
the 
> popup list, the user is to tap on a OK button before switching to the 
> selected list. The following are the codes I have done:
> 
> case popSelectEvent:
> 
> switch (eventP->data.popSelect.controlID) {
> 
> case Form1SelectPopTrigger:
> LstGetSelecetion (const ListType *listP);
> 
> 
> At this point, a value is returned based on item on the popup list. 
> What do I
> have to do now in order for the OK button to determine which form it
should 
> to go? I will appreciate any form of help. Thanks.
>

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


------------------------------------------------------------------------
Take part in the Penning on Squares Chinese Essay Writing Contest.
Submit your masterpieces or vote for your favourite works, and win
attractive prizes. Be there or be SQUARE!
http://sea.litcontest.lycosasia.com

cOntact @ Lycos <http://contact.lycosasia.com>
= 10MB for email and filestore + lots of other goodies...


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



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

Reply via email to