Name
Register Procedure
Syntax
procedure Register; begin ... end;
Description
When you write a design-time package, you will usually write a
Register procedure in one or more units that the
package contains. When Delphi loads the design-time package in the
IDE, it searches for a procedure named Register
and calls that procedure, if it exists. It calls the procedures in
the order in which the units appear in the package source
file.
Tips and Tricks
The procedure name must follow the capitalization shown here: an initial capital
R, followed by a lowercaseegister. This restriction is unusual for Pascal, but it provides compatibility with C++ Builder, which is a case-sensitive language. You can write a package in Delphi and load it in C++ Builder, or vice versa.The
Registerprocedure is optional.Delphi’s IDE calls the
Registerprocedure when it loads design-time packages. If you load the same package in an application, theRegisterprocedure is not called automatically.
See Also
| Package Directive |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access