Marco's Web Center

Menu for Books
Delphi 2007 Handbook
Mastering Delphi 2005
Essential Delphi 8 for .NET
Mastering Delphi 7
Essential Pascal
Essential Delphi
Buy Books Online
Marco's TechBookStore

Site Menu
Object Pascal Handbook
Delphi Handbooks Collection
Mastering Borland Delphi 2005
(Old) White Papers
(Old) Conferences

My Other Sites
Italian Site (
the delphi search

Spirit of delphi

Home My Blog Books Object Pascal Marco

Corrections for Mastering Borland Delphi 2005

This is a list of corrections for the book that have been found by readers. If you notice any other error or omission, please let me know. Beside this document, there is nother one with many updates related with new features of Delphi 2006. See my web site ( for details.

Chapter 1: Page 6

The book fails to mention that there is a free utility called Delphi Configuration Manager and available at that helps removing unneeded features form the IDE.

Chapter 3: Page 85

The SealedAndFinal example mentioned in the section “Sealed Classes and Final methods” is in fact part of the code for Chapter 4 and is available only in the Delphi for .NET version. Generating the Win32 version should be rather simple.

Chapter 3: Page 103

In the second paragraph, at the start of the 4th line, the word 'experiment' should rally be 'experience'.

Chapter 4: Page 125

Last paragraph, 'The parameter if this method...' should rather be 'The parameter of this method...'

Chapter 5: Page 158

At the end of the MiniSize program, the line:

MessageBox (0, PChar(strSize), 'Mini Program', MB_OK);

won't compile under .NET, where the PChar typecast has to be removed:

MessageBox (0, strSize, 'Mini Program', MB_OK);

The companion code is correct, the snippet in the book is not precise.

Chapter 7: Page 280

The .NET version of the RefList2 example doens't work. The ListView1Compare method needs a different signature, like the RefList example has. This is the correct code:

procedure ListView1Compare(Sender: TObject; Item1, Item2: TListItem;
   Data: TTag; var Compare: Integer);
procedure ListView1Compare(Sender: TObject; Item1, Item2: TListItem;
   Data: Integer; var Compare: Integer);

Chapter 7: Page 284

The project source of the .NET example CommDlgTestNet is lacking the [STAThread] statement before its begin.

Chapter 7: Page 288

Again, the project source of the .NET example MouseActivateDemoNet is lacking the [STAThread] statement before its begin.

Chapter 13: Page 502

The third code snippet is incorrect. The line

for field in cds do

should have been

for Field in cds.Fields do

Chapter 19: WebFind Example

Recently, Google changed the HTML returned by searches, properly including quotes around the href attributes. This breaks the WebFind example. Here is the updated code (3 lines) in the procedure TFindWebThread.HtmlToList:


    // find the initial part HTTP reference

    nBegin := PosEx ('href="http', strRead, nBegin); //updated

    if nBegin <> 0 then


      // find the end of the HTTP reference

      nBegin := nBegin + 6; /////// updated

      nEnd := PosEx ('>', strRead, nBegin);

      strAddr := Copy (strRead, nBegin, nEnd - nBegin - 1); //updated

Chapter 21: ASP.NET

The book shows some of the problems of using the Firefox browser with ASP.NET sites. However, the book fails to mention that you can configure an ASP.NET server to better recognize the Firefox browser, by adding a special “browserCaps" subsection in the <system.web> section of the web.config file (or in the global machine.config file). Examples (and more details) are given at these pages: