by Bob Swart (aka Dr.Bob)
If you're serious about Delphi Component Writing, then you should at least have a look at the internals of the Visual Class Library, and the best way to do that is to take a look inside the VCL source code.
For the 16-bits version of Delphi you can find the VCL source code included in the box with Delphi Client/Server and in the RAD Pack (which also contains Turbo Debugger for Windows, Resource Workshop, Resource Expert, Visual Solutions Pack and the ObjectPascal Language Manual). For the 32-bits version of Delphi you'll find that the VCL source code is part of the Delphi Developer and Delphi Client/Server Suite.
For more information about the Delphi VCL source code in the RAD Pack for Delphi 1.0x, check out Borland's website at http://www.borland.com/delphi/delcomp/radfact.html
Component Builder, a shareware tool (registration price US$ 20) written by John C. Taylor, creates all the necessary pascal code for new component properties, methods, message handlers and event handlers as well as the underlying declarations and code skeletons. Simply describe your properties, methods, etc., select a few attributes and Component Builder builds the component for you.
Component Builder eliminates a lot of the drudgery of typing the code needed to define a new component. You describe the properties, methods and event and message handlers you need, set the appropriate attributes for scope and dispatch and Component Builder generates the source code complete with underlying variable declarations and procedure and function skeletons. If you're new to component writing, this utility can help you through the learning curve. While it doesn't offer as much advanced features as the commercial tools, considering the price, it's a good place to start!
John is currently working on Component Builder "Gold" which will have much more functionality than the current version, it'll be a bit more expensive but registered users will get full credit for their $20. It should be available before the end of Q1 1997.
For more information about Component Builder, check out John Taylor's Delphi Power Page, where you can also download the Component Builder 16-bits version or 32-bits version.
TRANSFORM Component Expert
TRANSFORM Component Expert (retail US$ 125), by Objective Software Technology includes experts for both Delphi 2.0 and Delphi 1.0 in a single product. TRANSFORM installs as Library Expert into the Delphi Help menu, which gives it full access to all the classes and published properties of the VCL. This tool supports complete component development in Delphi forms (you can select a container class to replace the form). The expert automatically matches form properties and events to corresponding properties and events in the container class for the aggregate component. The component can be developed iteratively, by using a development project containing the component source and another test project that uses the component.
By mid-February 1997, a new version (2.5) will be ready, with full support for Ray Konopka's new business component framework, plus other secret goodies. Currently, features include:
Component Development Kit (CDK, list US$ 279) is written by Mark Miller from Eagle Software. The CDK 2.0 delivers the ultimate in class creation and modification power through an extremely easy to use and intuitive interface. Create new components, descend from existing ones, embed components into classes, make your forms more object-oriented, and modify classes visually. Create composite components, business components, data-aware components and more. Attach property editors and component editors instantly. Test your new components with the included evaluation version of reAct (also available at www.eagle-software.com).
The CDK 2.0 online help file includes a visual tour of the CDK 2.0, as well as detailed professional component-building help, a method scope/dispatch flowchart, trouble-shooting section and more. Upcoming features for the next version include a free upgrade to all existing CDK 2.0 customers to first CDK release compatible with Delphi 3.0. All other upcoming features are confidential.
There's a new Business Component Expert for the CDK available for download at Eagle Software's website. The business components generated by the new expert feature automatic field validation and calculation (no more OnCalcFields event handlers to mess up your form code!), a smart validation dialog that lists critical validation problems and warnings, as well as the ability to view calculated fields at design-time. This expert makes it easier than ever to distribute your business rules across more than one business object, with full support for embedding and linking to other business components. The architecture was developed by Ray Konopka, and includes a special CDK code template to make third-party table & query components compatible. For a limited time, this new wizard is free for all CDK owners (version 2.02c or up).
For more information about CDK and the new Business Component Expert, check out Eagle Software's website at http://www.eagle-software.com Information about CDK 2.0 can be found at http://www.eagle-software.com/prodcdk2.htm and http://www.eagle-software.com/factcdk2.htm.
For a "live" summary overview of the links mentioned in this column, point your browser at my website The Delphi Clinic at http://home.pi.net/~drbob/ and click on the "Dr.Bob's Journal" link. This link will bring you to the contents page that lists the bi-monthly themes and Delphi Internet Inspector columns, starting with last time on Debugging Tools for Delphi and this time on Component Writing Tools for Delphi.