Go To Homepage



Book Details
Practical Dojo Projects book cover
  • By: Frank Zammetti
  • ISBN10: 1-4302-1066-4
  • ISBN13: 978-1-4302-1066-5
  • 500 pp.
  • Published Sep 2008
  • Price: $46.99
  • eBook Price: $32.89




Errata Submission

If you think that you've found an error in Practical Dojo Projects, please let us know about it. You will find any confirmed erratum below, so you can check if your concern has already been addressed.

Submit Errata
Practical Dojo Projects (978-1-4302-1066-5)

Errata

Issue Author's Response
In chapter 6, the code in CodeCabinet.js around line 74-80 needs to be changed to this:

db.execute("INSERT INTO snippets VALUES " +
"(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", [
items[i].id[0], items[i].category[0], items[i].name[0],
items[i].description[0], items[i].author[0], items[i].eMail[0],
items[i].webLink[0], items[i].code[0], items[i].notes[0],
items[i].keywords[0]
]);

This alleviates a SQL exception thrown when inserting a snippet (something along the lines of 'parameter 0 is of an unknown type').

The exact reason for this is currently unclear to me, but my best guess is that the latest version of Gears handles things differently, specifically it can't deal with being passed arrays as the bind values, and previously it could. This is just a guess, and doesn't answer the question of why the attributes of an object in the items array would themselves be arrays either, or why name and description, which do not appear to be arrays, still require array notation to make it work.

I'm frankly a bit stumped at the moment, but this does appear to fix the problem regardless. I'd love to hear from any readers if they figure out the root cause!
The errata text is the solution for this issue as posted by the author to the Apress errata system.
The error is not in the book but in the description on the website:
"See how to build an interactive and fun came application using Dojo."

I guess it should be "game application".
The description on the Apress web site (and quite possibly other sites where the description of the book was copied from the original in error source) should read "See how to build an interactive and fun GAME application using Dojo".