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

Home: Books: Mastering Delphi 4

Mastering Delphi 4 Mastering Delphi 4

I've found a few small errors in Mastering Delphi 4, and a few changes required by the Delphi 4 Update 2 released by Borland on their web site, in the Delphi Download area.

Here is a list by chapter and page:

    Recent Additions

    Chapter 3, Page 113

  • At the bottom of the page the Voice method is called Verse. The sentence "To call the Verse function, we can simply write..." should read: "To call the Voive function...".

    Chapter 8, CustHint example

  • The object Label1 in the DFM file has the Hint property set to "Shoes the selection sequence". It should have been "Shows..."

    Chapter 14, FontBoxDemo example

  • Remove "FontBox" from the uses statement at the beginning of the file FbDemoForm.pas.

    Older Corrections

    Chapter 2, page 47

  • Figure 2.1 should be replaced with the following version. (The error is in the number of references for the strings.)

    Chapter 3, page 124

  • In the first code listing on the page, the two procedures are missing the square brackets with the index [I]. The two instances of FormList should be changed to FormList [I].

    Chapter 4, page 162

  • In the single line of code in the second half of the page, the property we set it SimpleText and not SimpletText.

    Chapter 4, page 164

  • In the SetMonth method of the listing, the test should be if (Value < 1) or ....

    Chapter 6, page 263

  • At the end of the second paragraph, the phrase "as we'll see in more detail in the next chapter" should have been removed.

    Chapter 7, page 310

  • At the end of the page, the fragment "However, at the" should have been removed.

    Chaptr 8, Page 390

    The example showing a Menu in a control bar works best if all of the ToolButtons have Grouped property set to True. Notice also that Borland has made available a free ToolMenu component on their Web site (in the Delphi Downloads area).

    Chapter 11, page 506

    On the 5th last line of the listing, in the loop for the code has an extra +1. It reads DbComboBox1.Item[Random(NoBranch)+1], but it should be DbComboBox1.Item[Random(NoBranch)].

    Chapter 16, page 760 (CppDll example)

  • The CppDll.dll library originally distributed with the source code for this book requires the VCL35.BPL package of C++Builder 3. Click here to download a version that doesn't require it:, size 52KB.

    Chapter 16, page 766

  • The section Overloaded Functions in Delphi DLLs was written for Delphi 4.0, but the Delphi 4.02 update changes the situation completely. In Delphi 4.02, you can export overloaded functions only by indicating the complete signature (the function parameters) in the export clause. Compiling the code excerpt on page 766 produces the error: [Error] Firstdll.dpr(65): No overloaded version of 'Triple' with this parameter list exists.
    You can easily fix the problem by changing the final lines to:
      Triple (N: Integer);

    The text describing the Delphi 4.0 situation as a possible cause of problems does not apply any more.

    Chapter 17, page 814

  • Figure 17.6 should be replaced with this version:

    Chapter 22, page 978

  • The Version Info (VInfo) example doesn't work if Windows is configured for a non-US locale, because the program uses the path '\StringFileInfo\0409040E', which is US specific. For example in UK the 'Locale ID' defaults to $0809 (not $0409), and the path should be converted as in: '\StringFileInfo\080904E4\FileDescription'. Either change the program using your own locale ID or make it more generic by extracting the locale ID dynamically from the system. Notice that unless you provide multiple versions of the strings, you should not use the run time locale ID but the one used by the developer at design time (which makes the code a little trickier).