Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
Dr.Bob's Delphi Notes Dr.Bob's Delphi Clinics
 The Revolutionary Guide to Delphi 2
See Also: Dr.Bob's Programming Books for all programming book by Bob Swart

The Revolutionary Guide to Delphi 2
by Bob Swart, Arjan Jansen, Brian Long, etc.
US/Canada:
UK/Europe:


  1. An Outline of Delphi - the Product
  2. Delphi Pascal
  3. Delphi Object Pascal
  4. Application Design
  5. Debugging Windows Applications
  6. Writing Database Applications
  7. The Borland Database Engine
  8. ReportSmith
  9. Borland, SQL and InterBase
  10. Writing Delphi Components
  11. Data-aware Components
  12. Component and Property editors
  13. Delphi Experts and VCS
  14. The Windows API - Beyond the VCL
  15. Interfacing with other apps, using DDE and OLE
  16. 32-bit Delphi, inc. threads & OLE automation
  17. Dynamic Link Libraries
  18. Optimization


The Revolutionary Guide to Delphi 2
errata sheet

p31, paragraph 3rd from bottom

"Another rather handy way of changing these types of property, especially if the list of options is small, usually just the Boolean values True or False, is to double-click the mouse on the property"

should read (based on the intro text)

"Another rather handy way of changing these types of property, especially if the list of options is small, usually just the Boolean values True or False, is to double-click the mouse on the property or press Ctrl+Enter"


p31, last paragraph

"Clicking on the ellipsis displays a dialog box..."

should read

"Clicking on the ellipsis or pressing Ctrl+Enter displays a dialog box..."


p60, last paragraph

"We discuss the use of this clause in more detail when we look at creating our own DLLs later on in Chapter 15"

should read

"We discuss the use of this clause in more detail when we look at creating our own DLLs later on in Chapter 17"


p98, code listing

 if (strToday = 'Sunday' and HaveNoDogToWalk) then
  begin
   bStayInBed := TRUE;
   Inc(nHappiness);
  end;
 else if bStartWeek then...

should read as follows to avoid an "Error in statement" compiler error in Delphi 1 or "';' not allowed before 'ELSE'" error in Delphi 2:

 if (strToday = 'Sunday' and HaveNoDogToWalk) then
 begin
   bStayInBed := TRUE;
   Inc(nHappiness);
 end { note no semi-colon }
 else if bStartWeek then...


p114, first Foreground Comment box

"Only classes that are derived from TPersistent or classes declared in the {$M+} state may declare properties in their public section."

should read

"Only classes that are derived from TPersistent or classes declared in the {$M+} state may declare properties in their published section. However, a bug in Delphi 2 means that any Delphi 2 classes can have a published section and declare properties there."


p115, second paragraph (unimportant typo)

"The first is that, unlike normal identifiers, properties can't be passed as variable parameters of afunction or procedure."

should read

"The first is that, unlike normal identifiers, properties can't be passed as variable parameters of a function or procedure."


p139, first paragraph.

"Thus the try part consists of the requests for resources, while the finally part contains the releases for them."

should read

"Thus the try keyword is preceded by the requests for resources. The try part itself makes use of the resources, while the finally part releases them."


p139, code listing.

It should read as it does in the help version of the book:

procedure TForm1.Button1Click(Sender: TObject);
var
  MyString TStrings;
begin
  MyString.Create;
  try
    { Do whatever with your Tstring }
  finally
    MyString.Free;
  end;
end;


p314, first code listing

"with LinkedRpt.InitialValues"

should read

"with LinkedRpt, InitialValues"

The same applies to the second listing


p468, Installation

Installing a DLL Expert in Delphi 1 can be done by using the DELPHI.INI file as described in this section. However, installing a DLL Expert in Delphi 2 is done by adding the name of the Expert to the Registry, and not by using DELPHI.INI.


p491, Installing ViCiouS 0.1

Installing a VCS is just like installing a DLL Expert, which means that for Delphi 1 we can get away with modifying the DELPHI.INI file, like described in this section, but for Delphi 2 we need to add the VCS to the Registry.


p519, last paragraph.

"Mercifully, you don't need to worry about which of these routines is called - you just call lstrlen in the normal way and the compiler will automatically map this onto a lstrlenA or lstrlenW call, depending on whether you're creating a Unicode application"

should read

"Currently, if you call lstrlen, you will be calling lstrlenA as dictated by the definition in the Windows unit. All the dual-named functions boil down to the Ansi ones, because the types Char and PChar map down to AnsiChar and PAnsiChar. In future versions of Delphi it is possible that you will be able to specify ANSI or Unicode and for the compiler to work out which one to call"


P534. Third paragraph

"In 32-bit Windows there are four..."

should read

"In 32-bit Windows there are five..."

also

"We won't be focusing on the 32-bit offerings...was only 16-bit"

should read

"The text in this section doesn't focus on the 32-bit specific APIs but the code on the CD caters for either platform. If your CD does not include 32-bit stuff, you should be able to find it here zipped up wherever you found this piece of errata."


p534. Table.

Should include, just after the ShellExecute entry, an entry for ShellExecuteEx, marked as 32-bit only. It's like ShellExecute but returns more information about the process.


p552, third paragraph

"...Boolean system variable, DebugHook, that indicates..."

should read

"...Byte system variable, DebugHook, that indicates..."


p561. First paragraph in "DDE" section

"... a DDE serve application ..."

should read

"... a DDE server application ..."


p563, third paragraph

"It only starts off with a capacity for eight messages"

should read

"In Win16 it only starts off with a capacity for eight messages (Win32 expands it as needed)"


p564. PostAppMessage section

"PostAppMessage"

should read

"PostAppMessage and PostThreadMessage"

Insert at end of first paragraph in that section:

"Win32 offers PostThreadMessage to send a message to a specific thread. PostAppMessage is still supported for backwards compatibility in Win32, by implementing it as a call to PostThreadMessage."


p575. End of "DDE" section. Append the following

"Unfortunately, it has been found by many people attempting to use the DDE components in Delphi 2, that they don't work very well. It is also noticeable that the DDE example program from Delphi 1 has been removed in Delphi 2. Although the theory expounded below is all fine, in practice DDE should be confined to Delphi 1, whilst OLE automation should be used in Delphi 2."


p586, bottom of page.

Delete last two lines. Those three unit aliases are added automatically


p613, "OLE Servers - Out-of-process" section.

Delete everything until the paragraph that begins

"For this, we'll create"


p639, last paragraph.

"...not only do you blistering..."

should read

"...not only do you get blistering..."


p654, halfway page.

"To understand why a Binary Search is slower than a Linear Search, we need to focus on algorithm analysis."

should read

"To understand why a Binary Search is faster than a Linear Search..."


Also, there is no particular reason why we didn't use the following technique (instead of 1st loading a FileStream) to load the files into the TIMemoryStreams (thanks to Ralph Friedman (TeamB) [100064,3102]):

  memoryStream := TMemoryStream.Create;
  memoryStream.LoadFromFile(FormName);
  memoryStream.Position := 0;
  IFormStream  := TIMemoryStream.Create(memoryStream);
  IFormStream.OwnStream := True;
  memoryStream := TMemoryStream.Create;
  memoryStream.LoadFromFile(UnitName);
  memoryStream.Position := 0;
  IFormStream  := TIMemoryStream.Create(memoryStream);
  IFormStream.OwnStream := True;

There has recently been a discussion in the BDELPHI32 forum about the fact that the VCL (visual) components are NOT thread safe. It seems the RevGuide states that they are...

On page 615: "Secondly, the Delphi Visual Comonent Library (VCL) and library routines are fully thread-safe..."

The Synchronize method is fundamental to avoid concurrent access to VCL components and anything in the user interface. It states the principal while failing to make the clear statement that the VCL code an sich is _not_ thread-safe.


Many thanks to Brian Long for his errata notes as well...


More Books written by Bob Swart


This webpage © 1995-2017 by Bob Swart (aka Dr.Bob - www.drbob42.com). All Rights Reserved.