As with any other design-time package, a wizard package must have a Register function. (See Registering components for details about the Register function.) In the Register function, you can register any number of wizards by calling RegisterPackageWizard, and passing a wizard object as the sole argument, as shown below:
procedure Register; begin RegisterPackageWizard(MyWizard.Create); RegisterPackageWizard(MyOtherWizard.Create); end;
namespace Example { void __fastcall PACKAGE Register() { RegisterPackageWizard(new MyWizard()); RegisterPackageWizard(new MyOtherWizard()); } }
You can also register property editors, components, and so on, as part of the same package.
Remember that a design-time package is part of the main RAD Studio application, which means any form names must be unique throughout the entire application and all other design-time packages. This is the main disadvantage to using packages: you never know what someone else might name their forms.
During development, install the wizard package the way you would any other design-time package: click the Install button in the package manager. The IDE will compile and link the package and attempt to load it. The IDE displays a dialog box telling you whether it successfully loaded the package.
Implementing the Wizard Interfaces
Installing a Wizard DLL
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|