Errata

Programming ColdFusion MX

Errata for Programming ColdFusion MX, Second Edition

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. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

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

Version Location Description Submitted By Date submitted Date corrected
Printed
Page 13
1st code sample, following 2nd paragraph

<!---I'm valid... weird--->

this should be:

<!--- I'm valid... weird --->

Anonymous   
Printed
Page 33
Last code block

<cfswitch expression="URL.Action">
should be:
<cfswitch expression="#URL.Action#">

Anonymous   
Printed
Page 136
7th paragraph

Example reads:

You can also initialize an array using the cfparm tag, as in the following:
<cfparam name="Grades" type="Array" value="#ArrayNew(1)#>

Should read:

You can also initialize an array using the cfparam tag, as in the following:
<cfparam name="Grades" type="Array" default="#ArrayNew(1)#">

Anonymous   
Printed
Page 167
first block of code

<cfif not IsDefined(application.Initialized')>
should read:
<cfif not IsDefined('application.Initialized')>

Anonymous   
Printed
Page 206
3/4 down the page, the password input tag

The password input tag has an extraneous quote before the maxlength attribute:

<input type="Password" name="Password" size="15" "maxlength="255">
should be:
<input type="Password" name="Password" size="15" maxlength="255">

Anonymous   
Printed
Page 217
Half way down example 8-6, in the CFLOGIN tag

<cflogin idletimeout="1800" applicationtoken="MyPortal" cookiedomain="example.com">

should read:
<cflogin idletimeout="1800" applicationtoken="MyPortal" cookiedomain=".example.com">
(note insertion of dot before example.com)

Anonymous   
Printed
Page 377
1st paragraph

'Next, we check to see if the directory list operation returned exactly two objects.
This is done using a cfif statement to evaluate the value stored in the RecordCount
query column. If the vlaue of RecordCount is two, we know that the directory is
empty,....'
it should say:
"Next, we check to see if the directory list operation returned zero
results. This is done using a cfif statement to evaluate
the value stored in the RecordCount query column. If the vlaue of
RecordCount is zero, we know that the directory is empty..."

Anonymous   
Printed
Page 527
Top of page, 3rd line of code.

In the book, on page 527, line 3, it reads:
xaxistype="scale" yaxistype="scale" sortxaxis="No"

both instances of the word "scale" should be "category". As it is written, ColdFusion throws an error:
For input string: "Greg"

The downloadable source codes for this book do however use the correct syntax.

Anonymous   
Printed
Page 550

The entry for alnum should read:

[:alnum:]
Matches any letter or number regardless of the case used. Using alnum is
the same as specifying [A-Za-z0-9]. Using w produces a similar result,
but also includes underscores.

Anonymous   
Printed
Page 552

[^[digit:]] is missing a colon (under D).
It should look like this:
[^[:digit:]]

Anonymous   
Printed
Page 660
3rd paragraph

You say that you can include code that makes up a method body within a cffunction and
then give an example where the included method body uses cfargument and cfreturn.
This does not work in ColdFusion as any code included with cfinclude must be valid
CFML in its own right. The example that you give causes a ColdFusion error stating
that cfargument and cfreturn must be used within a cffunction.

The example should look like this:

<cfcomponent displayname="Employee" hint="I'm for working with
employees">
<cfproperty name="dsn" type="string">
<cfset variables.dsn="programmingCF">

<cffunction name="getEmployee" returnType="any" output="no" access="public">
<cfargument name="id" type="numeric" required="true">

<cfinclude template="_methodGetEmployee">

<cfreturn selectEmployee>
</cffunction>
</cfcomponent>

This gets saved as _methodGetEmployee.cfm (the example also inadvertantly leaves off
the file extension):

<cfquery name="selectEmployee" datasource="#variables.dsn#">
SELECT *
FROM employeeDirectory
WHERE ID=#arguments.id#
</cfquery>

AUTHOR: Note that I do not advocate coding your CFCs like this, but it is a valid
option if long CFCs are a problem for you.

Anonymous   
Printed
Page 665
2nd code block

<cfset myObj.setEmployee(argumentcollection=args>
should be
<cfset myObj.setEmployee(argumentcollection=args)>

Anonymous   
Printed
Page 697
9th paragraph

It says:
XmlChildern
it should say:
XmlChildren

Anonymous   
Printed
Page 900
4th paragraph

It says:
cfhttp.FileContent
it should say
cfhttp.fileContent

Anonymous   
Printed
Page 1049
3rd

Text on page 1049 reads
<cfset Randomize(GetTickCount())>
it should read:
<cfset Randomize(12345)>

Anonymous