I use popups in 3 places in my app, but one of them is not working correctly
and I'm really stumped. Here is how I do it:
-- Since I have to dynamically build the list, when the popup control is
tapped, I intercept the ctlSelectEvent, build up a list of choices using a
dynamically allocated array of char *'s, and then set up the list by calling
LstSetListChoices, LstSetTopItem, LstSetSelection, and LstSetHeight. I then
return "false" to allow the popup control to work.
-- The list appears. If I then click on a list item, my code intercepts
popSelectEvent, looks at Event->data.popSelect.selection, etc., and then may
go to another form if a new selection is made. I also return "false" from
this handler (although it doesn't make any difference if I'm switching forms
anyway).
The problem occurs if, when the list appears, I tap somewhere else on the
screen. The list disappears as it should, but after that, I can't get the
popup control to work at all! Putting a breakpoint at the top of my event
handler, when I tap on the control I get events like penDown and penUp, but
no ctlSelectEvent. It is as if the control has become disabled for some
reason. The other controls on the screen continue to work, and if I go to
another view and then come back, the popup will work again (at least once).
This is not much different from the other popup lists in the program that
are working OK. I'm doing this on debug ROMs, so if I were doing something
really bad I'd expect to see an error message. Any ideas on what can be
happening here?
Doug Gordon
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/