Combined Errata
Page 0 CD
Project code referenced on Page 158 of the book is missing on CD. .
Author:
The project code is missing on the CD (found in book p.158) and was missing also in my files. This meant I failed to recompile the program on the final build (I have an automatic recompile wizard) and now I've found some pretty bad errors in the code.
The listing in the book, in fact, worked perfectly in Delphi 5, but doesn't work any more in Delphi 6. The reason is that the GetPropValue function now returns an exception in case the property doens't exists. My updated version of the program uses the IsPublishedProp function of the TypInfo unit to obtasin the same effect:
for I := 0 to ComponentCount -1 do
begin
// Delphi 6 version (slightly different from Delphi 5)
if IsPublishedProp (Components[I], Edit1.Text) then
begin
Value := GetPropValue (Components[I], Edit1.Text);
ListBox1.Items.Add (Components[I].Name + '.' +
Edit1.Text + ' = ' + string (Value))
end
else
ListBox1.Items.Add ('No ' + Components[I].Name + '.' +
Edit1.Text);
The corrected code is available in the minimal
http://www.marcocantu.com/md6/RunProp.zip
Incorrect CD code, .
Author:
Code on Page 294 of the book, 4th line up from the bottom of the page.
Actions example: the code in the book is correct but one line of the source code on the CD (and the download file on my site http://www.marcocantu.com/md6/d6fix.htm) was inadvertedly changed from:
ActionCount.Enabled := Memo1.Text <> '';
to:
ActionCount.Enabled := Memo1.Empty Text <> '';
The latter (which is the current code in the project you'll get, won't even compile!
Again, the correct code should be as referenced in the book:
ActionCount.Enabled := Memo1.Text <> ''; Page 20 & 21
7th line of page 20, the Code Insight page is actually in the Editor Properties dialog box, not the Environment Options dialog. The same error is repeated in page 21, while discussing the Ctrl+Shift+I key combination, as the Block Indent combo box is in the "General" page of the on Editor Properties dialog.
Page 42
Middle of page, the default form format is set in the new "Designer" page of the Environment Options dialog (instead of the older Preferences page).
Page 43
4th line, the correct command should be "Project -> View Source"
Page 126
In the shaded text at the top of the page, 2nd para, 2nd line, the MimiPack example should be "MimiPac"
Page 330
Figure 9.4 at page 330, is slightly different from the actual output,
To reference minor differences, see "www.marcocantu.com/md6/d6fix.htm" Page 462
Below the title "An Example of Component Messages", you can read: "The code of this method for the Enter key?s code and sends the same message...". A word is missing here. Should read: "The code of this method checks for the Enter key?s code..."
Page 490
Under the section "A Simple Delphi DLL",
The sequence of commands is actually "File > New > Other" (and not "File > New" as in Delphi 5). This brings up the New Items dialog, where you can find the DLL Wizard. Page 733
Middle of page, under "Disconnected Recordsets", disconnected recordsets require the "CursorLocation" property to be set to clUseClient, and not the CursorType property.
|