Folks,
I'm trying to structure the drawing in my program to cleanly draw
when necessary and never "double draw." Things are complicated by the
fact that I do some "background" calculation and draw the results as
they're available. I'm trying to find a good way to structure the
code to handle all this cleanly. Anyone have ideas/experience with
this kind of thing?
Right now I only FrmDrawForm() on update events (and frmOpen), so
that's fine. I'm also tracking winEnter/winExit events in my form's
event handler, so that I can track whether it's safe to draw the
background stuff. If not, I just set a "draw pending" flag, and every
time I get a new winEnter event, if there's pending stuff, I draw it.
This mostly works, but there are apparently some traps: if I bring up
the menus, then select an item that brings up a modal dialog, I don't
seem to get the last winEnter event. Here's what happens:
Bring up menus
winExit event
Select a menu item, menus go away
winEnter event
Dialog comes up
winExit event
Dialog goes away
nothing
So I never get another winEnter event, and my form is left thinking
it's not safe to draw.
It's possible I'm somehow swallowing the event higher up the chain,
but that's the only place I have winEnter/winExit clauses in my code,
so if so I don't know where.
Thanks for any thoughts,
Dave Johnson
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/