--- books/www/corrections.html 2002/12/10 20:46:36 1.50 +++ books/www/corrections.html 2003/01/20 16:37:40 1.68 @@ -1,3 +1,8 @@ + +

Corrections

This page contains a list of corrections to be made in the next printing of @@ -6,14 +11,16 @@ feel free open a bug section on the chapter pages, or send a message to the reviewers@mozdev.org mailing list. +

Note: All errors in the text and examples are shown in red and all corrections are shown in green.

Preface

@@ -23,8 +30,8 @@ to 'http://www.ore @@ -34,18 +41,23 @@ changed to 'applications built using XPF @@ -55,9 +67,15 @@ to 'CenterWindowOnScreen( ) function'
-
  • On page 40: '<toolbarbutton id="printBtn" label="Open" -oncommand="doPrint( );" />' has been changed to '<toolbarbutton -id="printBtn" label="Print" oncommand="doPrint( );" >'

    +
  • On page 34: 'We've packed a lot information in this chapter and it be a useful reference' has been changed +to 'We've packed a lot of information in this chapter and it will be a useful reference'

    + +
  • On page 40: '<toolbarbutton id="printBtn" label="Open" +oncommand="doPrint( );" />' has been changed to '<toolbarbutton +id="printBtn" label="Print" oncommand="doPrint( );" >'

    + +
  • On page 51: '<decription>The mozdev.org site [...] your own development project</decription>' has been +changed to '<description>The mozdev.org site [...] your own development project</description>'

    @@ -67,17 +85,51 @@ id="printBtn" label="Print" oncommand="d
    • On page 113: Javascript 1.5 reference link in footnote has been changed from -'http://developer.netscape.com/docs/manuals/js/core/jsref15/contents.html' to -'http://developer.netscape.com/docs/manuals/index.html?content=javascript.html'

      +'http://developer.netscape.com/docs/manuals/js/core/jsref15/contents.html' to +'http://developer.netscape.com/docs/manuals/index.html?content=javascript.html'

      +
    • -
    • On page 120: '</script.' has been changed to </script>'

      +
    • On page 120: '</script.' has been changed to '</script>'

      +
    • + +
    • On page 120: 'dump(l+'\n');' has been changed to 'dump(len+'\n');'

      +
    • -
    • On page 120: 'dump(l+'\n');' has been changed to 'dump(len+'\n');'

      +
    • On page 135: Example 5-11 has been changed to + +<html> + <head> + <title>Sound Service Play Example</title> + <script> + function play() { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + var sample = Components.classes["@mozilla.org/sound;1"].createInstance(); + sample = sample.QueryInterface(Components.interfaces.nsISound); + const SND_NETWORK_STD_CID = "@mozilla.org/network/standard-url;1"; + const SND_I_URL = "nsIURL"; + const SND_URL = new C.Constructor(SND_NETWORK_STD_CID, SND_I_URL); + var url = new SND_URL(); + url.spec = 'http://jslib.mozdev.org/test.wav'; + sample.play(url); + } + </script> + </head> + <body> + <form name="form"> + <input type="button" value="Play Sound" onclick="play();"> + </form> + </body> +</html> + +
    • -
    • On page 137: 'var connection = Components.classes ["@mozilla.org/network/ldap-connection;1";' has been changed to -'var connection = Components.classes ["@mozilla.org/network/ldap-connection;1"];'

      +
    • On page 137: 'var connection = Components.classes ["@mozilla.org/network/ldap-connection;1";' has been changed to +'var connection = Components.classes ["@mozilla.org/network/ldap-connection;1"];'

      +
    • -
    • On page 140: 'js> load(`chrome/jslib/jslib.js');' has been changed to 'js> load('chrome/jslib/jslib.js');'

      +
    • On page 140: 'js> load(`chrome/jslib/jslib.js');' has been changed to 'js> +load('chrome/jslib/jslib.js');'

      +
    @@ -86,13 +138,15 @@ id="printBtn" label="Print" oncommand="d
      -
    • On page 211: In 2nd sentence of paragraph 'QueryInterace' has been changed to 'QueryInterface'

      +
    • On page 211: In 2nd sentence of paragraph 'QueryInterace' has been changed to 'QueryInterface'

      -
    • On page 222: In Example 8-4 'mName: "a default value"' has been changed to 'mName: "a default value",'

      +
    • On page 222: In Example 8-4 'mName: "a default value"' has been changed to 'mName: "a default +value",'

    • On page 222: In Example 8-4 - + <xmp class="broken"> this.myCID, "My JS Component", this.myProgID, fileSpec, @@ -102,7 +156,7 @@ id="printBtn" label="Print" oncommand="d has been changed to - <xmp> + <xmp class="fixed"> compMgr.registerComponentWithType( this.myCID, "My JS Component", @@ -111,14 +165,14 @@ has been changed to type); -
    • On page 222: In Example 8-4 one of the duplicate 'dump(" ***** Registering: Simple JS component! ****\n");' lines have been -removed

      +
    • On page 222: In Example 8-4 one of the duplicate 'dump(" ***** Registering: Simple JS component! +****\n");' lines has been removed

      -
    • On page 223: In Example 8-4 one of the duplicate 'if (outer != null)' lines have been removed

      +
    • On page 223: In Example 8-4 one of the duplicate 'if (outer != null)' lines has been removed

    • On page 239: Example 8-15 has been changed to
      - +<xmp class="fixed"> DEPTH = ../../.. topsrcdir = ../../.. srcdir = . @@ -164,8 +218,20 @@ install:: $(TARGETS) <p><b>Chapter 10</b> <ul> -<li>On page 297: 'http://www.jslib.mozdev.org' has been changed -to 'http://jslib.mozdev.org'<br><br></li> +<li>On page 297: '<b class="broken">http://www.jslib.mozdev.org</b>' has been changed +to '<b class="fixed">http://jslib.mozdev.org</b>'<br><br></li> +</ul> + + +<a name="ch10"> +<p><b>Chapter 10</b> + +<ul> +<li>On page 314: In Example 11-5 '<b class="broken">var linetext = document.createTextNode(messageParagraphs[i]);</b>' +has been changed to '<b class="fixed">var linetext = document.createTextNode(lines[i]);</b>'<br><br> + +<li>On page 314: In Example 11-6 '<b class="broken">var linetext = document.createTextNode(messageParagraphs[i]);</b>' +has been changed to '<b class="fixed">var linetext = document.createTextNode(lines[i]);</b>'<br><br> </ul> @@ -176,7 +242,7 @@ to 'http://jslib.mozdev.org'<br><br></li <li>On page 336: In Example 12-6 -<xmp> +<xmp class="broken"> print ` <checkbox label="%s" />' % form['op1'].value print ` <checkbox label="%s" />' % form['op2'].value print ` <checkbox label="%s" />' % form['op3'].value @@ -184,7 +250,7 @@ to 'http://jslib.mozdev.org'<br><br></li has been changed to (note the difference in indentation and in using a single quote versus a backtick) -<xmp> +<xmp class="fixed"> print ' <checkbox label="%s" />' % form['op1'].value print ' <checkbox label="%s" />' % form['op2'].value print ' <checkbox label="%s" />' % form['op3'].value @@ -203,8 +269,8 @@ href="http://certs.mozdev.org">http://ce <ul> -<li>On page 365: 'http://www.mozilla.org/source.tml' has been -changed to 'http://www.mozilla.org/source.html'<br><br> +<li>On page 365: '<b class="broken">http://www.mozilla.org/source.tml</b>' has been changed to '<b +class="fixed">http://www.mozilla.org/source.html</b>'<br><br> </ul>