--- Dinesh Kumar wrote:
> I'm having a Popup list[i.e, using a list and a popup trigger]
> popup trigger always takes ctlSelect and PopSelectEvent.
>
> i'm handling the selection of list items with PopSelectEvent
> now i do have two buttons also in my form.for them if i use
> ctlSelectEvent then popSelectEvent is overlooked and the
> selection of list goes first to default of the ctlSelectevent
> switch. the other way if use only ctlSelectEvent and handle
> the selection of list after identifying my popupTrigger then
> the list doesn't popup and the first listitem is always
> selected and break.i can send the code if anybody wants Help
> me out.
I'm not sure I understand what you're saying, so you might have to send
some code to clarify.
It sounds like you are saying that the code for ctlSelectevent and
popSelectEvent get executed at the wrong time. This may be because
your select statement in your form handler is not properly written.
Here is an example:
Boolean handled = false;
switch( eventP->eType )
{
// other cases deleted....
case ctlSelectEvent:
if ( eventP->data.ctlEnter.controlID == FirstButton )
{
// insert code to do first button stuff ....
handled = true;
}
else if ( eventP->data.ctlEnter.controlID == SecondButton )
{
// insert code to do second button stuff ...
handled = true;
}
break;
case popSelectEvent:
if ( eventP->data.popSelect.controlID == YourPopTrigger )
{
if ( eventP->data.popSelect.selection == 0 )
{
// first item selected...
}
else if ( eventP->data.popSelect.selection == 1 )
{
// second item selected ...
}
// etc.
handled = true;
}
break;
default:
break;
}
return handled;
Note that each case ends with a break. If you leave that out,
execution "falls through" to the next statement.
__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/