Bozidar,
Thanks. Looks like my logic went down the drain. Too much programming in one
day I guess.
Mike
--- Bozidar Benc <[EMAIL PROTECTED]> wrote:
> Mike,
>
> You are updating prefData.game before user confirmation, and then you are
> using it for setting the list selection,
> so it is always set to the new selection, regardless of the user feedback.
>
> Try this:
> /*******************************/
> if(prefData.game != newGame) {
> if(FrmAlert(alertID_newGame) == 1) {
> // now set the label back to the old if necessary
> LstSetSelection(Id2Ptr(listID_game), prefData.game);
> CtlSetLabel(Id2Ptr(popuptriggerID_game),
> LstGetSelectionText(Id2Ptr(listID_game),
> prefData.game));
> }
> else {
> prefData.game = newGame;
> }
> }
> /*******************************/
>
>
> Best regards,
>
> Bozidar Benc
> Benc Software Production
> http://www.benc.hr
>
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Mike
> > McCollister
> > Sent: Thursday, September 26, 2002 8:52 PM
> > To: Palm Developer Forum
> > Subject: Forcing a list back after the user changes it
> >
> >
> > Hi,
> >
> > I have a popuplist that may require confirmation from the user after it is
> > selected. If the confirmation is denied, then I want to set the
> > list back to
> > what it was before. However, that does not happen. Here is some
> > code from my
> > event handler routine that I am using.
> >
> > note that handled = true when all of this starts
> >
> > case popSelectEvent:
> > switch(event->data.lstSelect.listID) {
> > case popuptriggerID_game:
> > newGame = LstGetSelection(Id2Ptr(listID_game));
> > if(prefData.game != newGame) {
> > prefData.game = newGame;
> > if(FrmAlert(alertID_newGame) == 1) {
> > // now set the label back to the old if necessary
> > LstSetSelection(Id2Ptr(listID_game), prefData.game);
> > CtlSetLabel(Id2Ptr(popuptriggerID_game),
> > LstGetSelectionText(Id2Ptr(listID_game),
> > prefData.game));
> > }
> > }
> >
> > break;
> >
> > default:
> > handled = false;
> > break;
> > }
> > break;
> >
> > Any ideas on how to do this?
> >
> > Thanks,
> >
> > Mike McCollister
> >
> > __________________________________________________
> > Do you Yahoo!?
> > New DSL Internet Access from SBC & Yahoo!
> > http://sbc.yahoo.com
> >
> > --
> > 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/
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/