Delphi Versions

I started developing with Delphi 2, I moved to Delphi 5 at some point, and I am struggling with Delphi 6. Of the 3, Delphi 5 is definitely the best.

TPageControl | Built-In Help | Built-In Actions | Different Units


TPageControl

Programs that compile perfectly in Delphi 5 have problems when converted to Delphi 6 and then converted back to Delphi 5. For instance, both versions use the TPageControl ... however, the number of published properties is different in the 2 versions.

Specifically, TPageControl.TabIndex

In delphi 5, TabIndex is a protected property of TCustomTabControl. In Delphi 6, it is published (and therefore stored in the *.dfm [Form definition] file).

So,


Built-In Help

Delphi 5 - super
Delphi 6 - What happend??


Built-In Actions

Actions are one of the reasons that Delphi is a super language. In Delphi 5, only a few Built-In Actions were provided. Delphi 6 adds a bunch more ... if only they worked.

Specifically, two actions (TSearchFind and TSearchReplace) are based on TSearchAction. The critical line is

Unfortunately, SearchBuf does not locate a match if the target pattern of characters occurs at the beginning of the string being searched - Fixed in Delphi 6 Update Pack.

Neither version has enough documentation on these - see Pre-Defined action classes for about one line per action.


Improved Actions

Delphi 6 adds a new Action manager that simplifies building menus and toolbars. I haven't used this yet because my code has to also compile under version 5.


Different Units

Units are included via a uses clause. In addition to the new capabilities added to Delphi 6, some Delphi 6 capabilities require including different units than Delphi 5 used. Unfortunately, if you want code to compile in both versions, you now have to include conditional compiler directives to automatically swap units.

For instance, Variants are built into the Delphi 5 compiler and no units need to be included - in Delphi 6, you must include the Variants unit. This example will work in both compilers.

Some other differences


Author: Robert Clemenzi - clemenzi@cpcug.org
URL: http:// cpcug.org / user / clemenzi / technical / Languages / Delphi / Delphi_Versions.html