Authoring a Conditional "Please Wait . . ." Message Box

[This is preliminary documentation and subject to change.]

The following example illustrates how to author a conditional message box that pops up and warns the user that a background task is still running whenever the user activates a displayed control prematurely.

The example also illustrates how the SpawnWaitDialog ControlEvent can in general be used to protect a control that triggers an action dependent upon the completion of a background task.

In this example, a Selection Dialog containing three pushbutton controls labeled Install Now, Next, and Disk Cost is displayed to the user during the installation process. However, the installer also carries out a disk space costing task in the background while displaying this dialog box. The author wishes to protect these buttons from activation and wants a "Please wait" message box to pop up if the user pushes any of the buttons before the costing has completed. The author also wants this message box to contain a Cancel button and to disappear as soon as the background task is finished .

    To display a dialog box asking the user to wait while background disk costing is completed
  1. Use the authoring capabilities of the installer to add a new modal dialog box, named WaitForCosting, into the Dialog table. The dialog box should display a text string that says "Please wait while disk space costing is completed."
  2. Add a single pushbutton control to this dialog, labeled Cancel, by authoring it into the Control table.
  3. Link the Cancel pushbutton to a control event that closes the WaitForCosting dialog box by authoring an EndDialog ControlEvent into the ControlEvent table. Set the argument of the EndDialog Control event to be Exit.
  4. Link a SpawnWaitDialog ControlEvent to the existing Install Now, Next, and Disk Cost pushbutton controls displayed in the Selection Dialog box. Set the argument of this control event in the ControlEvent table to be the WaitForCosting dialog and set the expression in the Condition column of the table to be: CostingComplete =1.