|
What's New in Delphi 3? |
Delphi 3 has a number of changes from Delphi 2. This page briefly describes the changes that affect Secrets of Delphi 2. After reading about the changes, download update3.exe (566 KB), which copies the new packages and modified source files to your Secrets of Delphi 2 directory.
Read S_Delphi.inc to learn about the conditional compilation directives.
Packages: The biggest change is that you must use packages to install components. Secrets of Delphi 2 uses two packages:
You can link your applications to Secret30.dpl or you can choose to link statically with the Secrets components. If you choose the package route, you must release Secret30.dpl with your application.
S_Comp30.dpl is the design-time package. It contains the property editors, component editors, and so on. To install the components in Delphi's component library, add S_COMP30.DPL from Component|Install Package...
VMT: The VMT contains new fields, and some old fields have a slightly different format. The changed format helps implement packages by introducing an extra level of indirection. A VMT points not directly to the desired information, but to a link table that Delphi can quickly update when it loads a package. That's how Delphi manages RTTI across module boundaries. RttiTool and VmtDemo show the new format.
Resources: Another change introduced by packages is that HINSTANCE is not always right when loading resources. HINSTANCE is always the package's handle. When loading resources, such as in S_StrRes, you need to load the resource from the caller's module. See S_StrRes to learn how this works in Delphi 3.
Experts: Packages let you install an expert in the component library, as a package, which is really a DLL. In some respects, this has the advantages of a separate DLL, plus the advantages of linking into the component library. See the AutoSave demo for an example. To learn more about experts in Delphi 3, read Hidden Paths of Delphi 3, also by Ray Lischner.
Bug Fixes: Thanks to Hallvard Vassbotn, Duncan Murdoch, Paul van der Eijk, and others for pointing out bugs and suggesting improvements to the components and units.