Delphi Clinic | C++Builder Gate | Training & Consultancy | Delphi Notes Weblog | Dr.Bob's Webshop |
|
Borland Delphi 2005
In this paper, I will cover some of the new features in Delphi 2005, showing how to get the best out of Delphi 2005 right from the start.
I'll also cover some "semi-documented" features.
What's New in Delphi 2005
First of all, I've written a technical white paper describing What's New in Delphi 2005 which is now published on the Borland Developer Network.
My 10 top reasons for upgrading to Delphi 2005 are as follows:
Compiler Version?
One of the questions I've received in the past few weeks is about the compiler version of Delphi, which can best be determined using the RTLVersion compiler define (which is 17 for Delphi 2005) as follows:
program RTLVersionDemo; {$APPTYPE CONSOLE} begin {$IF RTLVersion=17} writeln('Delphi 2005 with RTLVersion',RTLVersion); {$ELSE} writeln('Not Delphi 2005, RTLVersion = ',RTLVersion); {$IFEND} readln; end.
Self-defined Regions?
Another questions concerns the use of self-defined collapsible regions, which is hardly documented in the on-line help.
Fortunately, it's very easy: you can also define you own regions of code that can be folded, using special $REGION and $ENDREGION compiler directives, as follows:
{$REGION 'My own managed source code'} ... ... {$ENDREGION}The comment in the $REGION compiler directive not required, but will be placed in the folded code box, and helps you to identify the contents of the folded code.
Configurable Helpfiles?
Someone else asked about Delphi 2005 helpfiles: if you didn't install crystal reports and don't need it in the helpfile, then there is a way to eliminate it from the helpfile.
See the C:\Program Files\Borland\BDS\3.0\Help\Common directory for the helpfiles.
You may first have to uninstall the help using the following command:
reghelp -7and then edit the bds3.HxA file and remove the line with
<AttVal Name="CrystalReports" Display="Yes" UIString="Crystal Reports" />Optionally, you can also edit the bds3.HxT and standaloneCommon.xml file and remove the Crystal references (make a backup of all files, just in case!).
<Filter Name="Delphi 2005, Indy, Rave, Crystal">"DocSet"="bds3" OR "DocSet"="indy" OR "DocSet"="rave" OR "DocSet"="CrystalReports"</Filter>to
<Filter Name="Delphi 2005, Indy, Rave">"DocSet"="bds3" OR "DocSet"="indy" OR "DocSet"="rave"</Filter>After that, you can register the helpfiles again using
reghelp 7You can run reghelp on the commandline to get more information. The argument is made up of bits: 1 = common, 2 = .NET and 4 = Win32. So if you only want the .NET and Win32 material, then you can also call reghelp 6. A negative number uninstalls help. And you should first call "reghelp -7" before installing any portion of the help again.
Delphi 2005 Project Upgrade Dialog
If you use the Project Upgrade Dialog to migrate existing .dpr projects to Delphi 2005 for either Win32 or .NET, then you may experience that Delphi 2005 hangs after you click on OK in the Project Upgrade dialog.
The issue is reported to Borland, but in the meantime, I've found a good workaround: load a .pas or .dfm file just before you open up the .dpr file (the .dpr will result in the upgrade wizard being displayed).
Opening a .pas/.dfm file will load a Delphi personality, so you can safely upgrade/migrate the project.
You can even close the .pas/.dfm file before you open the .dpr - it doesn't have to remain loaded (but it was only needed to load a Delphi personality - even if it isn't the same personality you want to migrate the project to).
As a consequence, upgrading projects when you have just been working on other Delphi projects (without closing and restarting the Delphi 2005 IDE) also works fine.
You may only encounter the hang if you've just started the Delphi 2005 IDE (and then the aforementioned workaround will help you avoid it).
Delphi 2005 Chats on BDNRadio
Delphi 2005 Training Manuals
There have been a number of public chats on BDNRadio which are now available for download.
If you missed some, then make sure to attend future ones, as they offer a chance of asking questions to the R&D engineers that built the products.
The 24 Hours of Delphi was a great event, in which I also participated.
Delphi 2005 Tutorials
I have written six technical hands-on
If you like these tutorials, then you should check out my courseware manuals (between 100-200 pages in PDF format).
Several Delphi 2005 Courseware manuals (including Delphi 2005 Essentials, ASP.NET Web Forms, XML, SOAP and Web Services) are not only used in my training classes, but now also available for purchase using my ASP.NET electronic courseware on-line ordering application.
Each courseware manual can be used for a 3-day training course - either in workshop or self-study.
Advanced ASP.NET and Enterprise Core Objects II courseware manuals will be available for purchase later in 2005.
Title Platform Available Delphi 2005 Development Essentials Win32/.NET 29 Apr, 2005 Delphi 2005 VCL Database Development Win32/.NET May 2005 Delphi 2005 ADO.NET Database Development .NET May 2005 Delphi 2005 ASP.NET Web Development .NET 29 Apr, 2005 Delphi 2005 XML, SOAP & Web Services Development Win32/.NET 29 Apr, 2005 Delphi 2005 Component Development Win32/.NET 11 July, 2005