> I've just come across an odd problem using POSE with the m505 ROMs (debug
> and normal).

Okay - so this is Palm OS 4.0. Have you tried other versions? AFAICT, the
behavior should be the same all the way back to 1.0.

> I have a small dialog (100 pixels high) that pops up over a
> form using FrmPopupForm.  In the dialog, the user enters data into a few
> fields and then hits "ok" to return to the previous form
> (FrmReturnToForm(0)).  Now, the dialog _doesn't_ have SaveBehind set, so
the
> OS sends me a nice frmUpdate event.  So far so good.  I have code that
> updates a couple fields on the form based on the input to the dialog, and
> then I return false, so that the default OS action will occur (ie:
> FrmDrawForm).  The odd thing is, in the FrmUpdateEvent, I am unable to
> update any part of the screen that _was_not_ obscured by the dialog.

Yup. The OS sets the clipping rectangle to the damaged area before sending
your event handler a frmUpdateEvent. The idea is that the only part of the
screen that should need to be redrawn is the damaged area. By clipping to
this area, flicker is minimized.

The problem is that you've changed the state before the dialog closes, so
you really do want to redraw more than just the damaged area. If you invoked
the dialog using a blocking API such as FrmDoDialog, you could just update
the display when the dialog closes and the function returns. In your case,
you're using non-blocking APIs: FrmPopupForm and FrmReturnToForm. You need
to do a full refresh after the dialog is dismissed. You could do this by
enqueuing a frmUpdateEvent of your own after calling FrmReturnToForm. I
think that would work. It's a bit wasteful because part of the screen gets
updated twice.

You could set the clipping rectangle manually, but I don't recommend this
solution.

Anyone else have any ideas? I'm just thinking out loud here. It seems like
there should be a clean way to do this without updating part of the screen
twice. You can't use EvtAddUniqueEventToQueue because the system doesn't
enqueue its frmUpdateEvent; it sends it directly to the event handler.
-
Danny

-- 
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