Beginning CouchDB Errata

Whilst I am on the subject of CouchApps, there is a typo in code listing 10-4 on page 171 of Beginning CouchDB which causes the javascript to not work. Specifically, if you get a message along the following lines in your browser’s error console:

$.CouchApp is not a function

You can fix this by  making an edit at the bottom of listing 10-4, in the last <script> line it should read:

<script src="vendor/couchapp/jquery.couch.app.js"></script>

instead of:

<script src="vendor/couchapp/jquery.couchapp.js"></script>

Notice the missing period between couch and app? Enough to stump a beginner for hours!

Addendum #1 – A missing $ in listing 10-6 for main.js on page 176 in the parseInt line:

var task_count = parseInt('#task_count span').html(), 10);

should be:

var task_count = parseInt($('#task_count span').html(), 10);

Bookmark and Share
This entry was posted in coding, g33k, linux, software and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

You must be logged in to post a comment.

  • StrangeAeons is the blog of Simon Wells, an academic researching Argumentation Theory, Automated Reasoning, Intelligent Agents (IA), and MultiAgent Systems (MAS).

  • Categories

  •  

    September 2010
    M T W T F S S
    « Jul    
     12345
    6789101112
    13141516171819
    20212223242526
    27282930  
  • Archives