Hello,
You do the loop when frmOpenEvent and set flag when frmOpenEvent, you must initialize 
flag out of loop, and change flag out of loop, I think you can't write the loop in 
case frmOpenEvent because frmOpenEvent is before ctlSelectEvent.

----- Original Message ----- 
From: "Hemamalini" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, March 18, 2003 11:43 AM
Subject: Re: In a loop is it possible to use button


> Hello,
>       Yes, as u said i am using flag only.even then it is not coming out of
> the loop. i have  attached code here.please tell me where i am wrong
> thank u
> 
> case frmOpenEvent:
>    frmP = FrmGetActiveForm();
>    MainFormInit( frmP);
>    FrmDrawForm ( frmP);
>       g_bStarted = true ;// flag is set here
> 
>             while(g_bStarted == true )
>            {
>               if ( serialNb == STATUS_OK)
>                 {
>                   // doing some operation
>                   g_bStarted=true;
>                   }
> 
>         }
> 
>    handled = true;
>    break;
>   case ctlSelectEvent:   // control button was pressed and released.
>    frmP = FrmGetActiveForm();
> 
>    switch (eventP->data.ctlEnter.controlID)
>    {
>           case MainB2Button:
>      {
>        g_bStarted = false ;//     setting flag to off
>                   }
>      break;
>      }
>    handled = true;
>    break;
> ----- Original Message -----
> From: "Ivy" <[EMAIL PROTECTED]>
> To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> Sent: Tuesday, March 18, 2003 11:27 AM
> Subject: Re: In a loop is it possible to use button
> 
> 
> >
> > Please try to use a flag in ctlselectevent and through the flag control
> the loop.
> >
> > ----- Original Message -----
> > From: "Hemamalini" <[EMAIL PROTECTED]>
> > Newsgroups: palm-dev-forum
> > To: "Palm Developer Forum" <[EMAIL PROTECTED]>
> > Sent: Tuesday, March 18, 2003 11:16 AM
> > Subject: In a loop is it possible to use button
> >
> >
> > > Hello,
> > >        In FrmOpenEvent i doing a loop function.i have a stop button.how
> can
> > > i use  the stop button in loop function. can i use ctlselectevent in
> loop
> > > funtction. is there any other way to exit from loop
> > > Thank you in advance,
> > > Hema
> > >
> > >
> > >
> > > --
> > > For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
> > >
> > ?h?撷??'??x-??`藿?リ泞沪锄+?Р骒r?{?y?辩《??铭Z?,?&??拴?
> 睚???
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
> http://www.palmos.com/dev/support/forums/
> 
⒏??j亘?畈)喽?Y?鳐????+?Р骒r?z?j乾y???)jYū???拴?睚???

Reply via email to