Chapter 13: The Wizard Control, from Enterprise Curl, by Prentice Hall | 5 | WebReference

Chapter 13: The Wizard Control, from Enterprise Curl, by Prentice Hall | 5

Enterprise Curl: The Wizard Control

Import Statement

The enterprise framework classes described in this chapter are consolidated into an import file to create a highly reusable module. The import file for the COM.ENT-CURL.WIZARD package is shown in Figure 13–9.

This import file can be referenced by any other enterprise framework module, which would then have access to the functionality available in the COM.ENT-CURL.WIZARD package.

FIGURE 13–9 WIZARD package code listing.


In this chapter, we saw how to build the wizard control, which has a configurable and extendable architecture.

The WizardControl acts as the base class for all application wizards and provides functionality to navigate through an array of WizardForm pages to present the appropriate display to the user. Both classes also work together seamlessly to ensure that user-selected values are consolidated and returned in a single String to the process that opened the wizard. The public-get primitive was discussed, specifically how it could be used instead of the {getter} and {setter} design patterns. Through the inheritance contained in the WizardControl, we saw how to make use of classes residing in other enterprise framework modules, along with how to make use of the Curl system {popup-question} procedure to present a modal dialog box with Yes, No, and Cancel buttons to the user. Finally, we examined how to use an abstract method and how the COM.ENT-CURL.WIZARD module could be made widely available through the use of packaging and the import statement.

In the next chapter, we will review how a specific application can make use of this wizard framework module.


Figure 13–1  WIZARD object model.

Figure 13–2  Wizard control design layout.

Figure 13–3  WizardControl.constructor code listing.

Figure 13–4  WizardControl.commit-return-message code listing.

Figure 13–5  WizardControl.set-wizard-form code listing.

Figure 13–6  WizardControl.check-buttons code listing.

Figure 13–7  WizardControl.create-window code listing.

Figure 13–8  WizardForm code listing.

Figure 13–9  WIZARD package code listing.

Created: May 2, 2003
Revised: May 2, 2003