RAD Studio
ContentsIndex
PreviousUpNext
Writing a Wizard Class

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 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 ToolsRepository menu item). The user can check the New Form check box for a form wizard, which tells the IDE to invoke the form wizard when the user chooses the FileNew Form menu item. The user can also check 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 check the New Project check box for a project wizard. When the user chooses FileNew 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). 

The following topics provide details on how to implement and install a wizard:

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!