In article <81186@palm-dev-forum>, [EMAIL PROTECTED] says...
>
> Hi,
>
> I'm working on an application which will have a series of popup forms in a
> wizard. When the user completes a form a taps on the Next button, I need to
> switch to the next form in the process. For other reasons, I really need to
> be able to call these forms via FrmPopupForm and not via FrmGotoForm. I
> start out at a form called Main. Let's say the first two popup forms are
> Form1 and Form2. At first, I responded to a tap on Form1's Next button like
> this:
>
> FrmReturnToForm(0);
> FrmUpdateForm(0, Form1_next);
>
> and in Main, I had:
>
> case frmUpdateEvent:
> switch (event->data.frmUpdate.updateCode) {
> case Form1_next:
> FrmPopupForm(Form2);
> handled = true;
> break;
> }
> break;
>
> This worked OK, but when I did the FrmReturnToForm, the Main form was
> briefly redrawn. This caused an annoying quick flicker that I wanted to get
> rid of. I changed my code to handle the Next button to this:
>
> frm = FrmGetActiveForm();
> FrmPopupForm(Form2);
> FrmDeleteForm(frm);
>
> This actually worked exactly as desired. Form2 appeared, and the prior form
> (Form1) was deleted. But since Form1 was now NOT the topmost form, nothing
> was updated visually, which is just what I wanted. However, when I ran this
> on a Debug ROM, I received this error message: "Form.c, Line 238 Call
> FrmEraseForm first". Of course, if I change my code to this:
>
> frm = FrmGetActiveForm();
> FrmPopupForm(Form2);
> FrmEraseForm(frm);
> FrmDeleteForm(frm);
>
> the FrmEraseForm causes the underlying form to be redrawn, which is exactly
> what I am trying to avoid. Can anyone suggest a (clean/legal) way to switch
> between the two popup forms without having the underlying form redrawn?
Tom, why not make a totally blank controller form, then have that popup
first before any of your wizard pages appear? The controller form would
have nothing on it but would handle the update-popup-next-page cycle you
originally coded. So, while the wizard was running, the form stack
would look like
caller : wizard controller : wizard page
This actually is quite similar to the structure that wizards use on the
desktop, where a frame window holds the next/previous/finish buttons and
the pages are their own dialogs.
--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/