From: "Scott L. Johnson" <[EMAIL PROTECTED]>
Subject: RE: Popup List problem
> Does your event loop handle the ctlSelect event (if you have any
> buttons on the form) and if so, does it return true when you tap
> this trigger?  This would case the problem you are seeing.  You
> must return false to permit the OS to pop up the list.

That was it!  Thank you Scott.  I don't know when, if ever, I would have
noticed that I was returning true for *any* ctlSelectEvent.  I had a button
and a checkbox on that form and the flawed logic I had was:

// bad code...
case ctlSelectEvent:
    If (eventP->data.ctlEnter.controlID == TheButton)
        doButtonStuff();
    else if (eventP->data.ctlEnter.controlID == TheCheckbox)
        doCheckBoxStuff();
    handled = true;
break;

I changed the code so handled is true only if I do the button or the
checkbox and now the list opens when I tap the trigger.

// better code...
case ctlSelectEvent:
    If (eventP->data.ctlEnter.controlID == TheButton)
    {
        doButtonStuff();
        handled = true;
    }
    else if (eventP->data.ctlEnter.controlID == TheCheckbox)
    {
        doCheckBoxStuff();
        handled = true;
    }
break;

Thanks to everyone who suggested possible fixes for this problem.



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

Reply via email to