Writing a Wizard Class

From RAD Studio
Jump to: navigation, search

Go Up to Using Special Interfaces to Extend the IDE


There are four kinds of wizards, where the wizard kind depends on the interfaces that the wizard class implements. The following table describes the four kinds of wizards:

The four kinds of wizards

Interface Description

IOTAFormWizard

Typically creates a new unit, form, or other file.

IOTAMenuWizard

Automatically added to the Help menu

IOTAProjectWizard

Typically creates a new application or other project.

IOTAWizard

Miscellaneous wizard that doesn't fit into other categories.


The four kinds of wizards differ only in how the user invokes the wizard:

  • A menu wizard is added to the IDE's Help menu. When the user picks the menu item, the IDE calls the wizard's Execute function. Plain wizards offer much more flexibility, so menu wizards are typically used only for prototypes and debugging.
  • Form and project wizards are called repository wizards because they reside in the Object Repository. The user invokes these wizards from the New Items dialog box. The user can also see the wizards in the object repository (by choosing the Tools > Repository menu item). The user can select the New Form check box for a form wizard, which tells the IDE to invoke the form wizard when the user chooses the File > New > Form menu item. The user can also select the Main Form check box. This tells the IDE to use the form wizard as the default form for a new application. The user can select the New Project check box for a project wizard. When the user chooses File > New > Application, the IDE invokes the selected project wizard.
  • The fourth kind of wizard is for situations that don't fit into the other categories. A plain wizard does not do anything automatically or by itself. Instead, you must define how the wizard is invoked.

The Tools API does not enforce any restrictions on wizards, such as requiring a project wizard to create a project. You can just as easily write a project wizard to create a form and a form wizard to create a project (if that's something you really want to do).

Topics

See Also