Well, nobody responded to my message, so I guess I'll have to answer it
myself (I guess most questions that get answered here are of the "please
tell me how to do X so that I don't have to read the documentation") :-).
Anyway, the source of this problem is that the list resource that I was
using had the "Usable" attribute checked! I must have left this checked by
mistake, as I definitely know better (and that's why I had not looked
there). Why having this checked would cause this type of stange problem, I
don't have the faintest idea. But, as soon as I unchecked it everything
started working!
Doug Gordon
> -----Original Message-----
> From: Gordon, Douglas
> Sent: Wednesday, January 24, 2001 8:32 AM
> To: 'Palm Developers'
> Subject: Popup only works once
>
> 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/