Errata

Programming ASP.NET AJAX

Errata for Programming ASP.NET AJAX

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 27-28
last paragraph on page 27 / figure 2-2 on page 28

Example 2-2 suggests multiplying the random number by 6 and taking the floor of it to give a number in the range 1-6. This has two problems, firstly, the number, after multiplication, can be 0 and the floor of 0 is 0; secondly, the odds of getting 6 are less than that of getting any other number as the number can be exactly 1,2,3,4 or 5 but never 6. The correct way is to multiply by 6, then take the floor of this number and add 1 - this will give equal probablity to the numbers 1 to 6.

The code in figure 2-2 should then read:

...
var rand = Math.random();
rand = 1 + Math.floor(6 * rand);
...

Anonymous  Jan 25, 2010 
Printed Page 37
3rd last line

There is a line

DigitalBook.prototype=new Book(); // derive from book

The code is working fine without that line also; what is the significance of that line?

Anonymous   
Printed Page 70
code block defining the Array.forEach() function

The line:

function Array$forEach(a, fnct) {

should read:

function Array.forEach(a, fnct) {

Anonymous   
Printed Page 72
last code line before note

the istruction:
Type.registerClass("OReilly.Software")
should read:
OReilly.Software.registerClass("OReilly.Software")

This should be fixed also in the code of example 4-1, othewise the code does not work (unless commenting
out the line).

Anonymous   
Printed Page 97
Paragraph 2

There appears to be no need to create:
function doNothing(result)

The SaveTime method as written requires no arguments.

Code appears to run fine using:
function pageLoad(){
PageMethods.SaveTime();
}

Did the original SaveTime implementation take arguments? If so, are they not automatically supplied as null values in JavaScript per your earlier JavaScript discussion (if not explicitly provided in the function call)?

Not sure what you intend by routing the "callback to a function that doesn't do anything".

Anonymous