--- books/www/corrections.html 2002/12/11 16:40:13 1.54 +++ books/www/corrections.html 2003/03/13 17:16:39 1.86 @@ -1,9 +1,9 @@ - -

Corrections +

Corrections

This page contains a list of corrections to be made in the next printing of the book. If you have suggestions for changes or find errors in the text, @@ -11,40 +11,70 @@ 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

- +

Chapter 1

- +

Chapter 2

- +

Chapter 3

    +
  • 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 35: 'secondLevelNodes[I] = docEl.childNodes[i];' has been changed to 'secondLevelNodes[I] = docEl.childNodes[I];'

    +
  • 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>'

    + +
  • On pages 58 and 59: Example 3-15 has been changed to (note the addition of spaces to seperate values) + + +<?xml version="1.0"?> +<window id="hello-goodbye" + title="Hello Goodbye" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" + style="min-width:100px;min-height:100px;background-color:white;"> + <broadcasterset id="broadcasterset"> + <broadcaster id="cmd_hello" oncommand="alert('Hello There!');"/> + </broadcasterset> + <keyset id="keyset"> + <key id="key_h" key="H" observes="cmd_hello" modifiers="accel,shift" /> + <key id="key_g" key="G" command="cmd_goodbye" modifiers="accel,shift" /> + </keyset> + <commandset id="commandset"> + <command id="cmd_goodbye" oncommand="alert('Goodbye!');" /> + </commandset> + <spacer flex="1"/> + <label value="hello/goodbye"/> + <textbox value="type ctl+shft+h"/> + <textbox value="type ctl+shft+g"/> + <spacer flex="1"/> +</window> + + +
+ + + +

Chapter 4 + +

    + +
  • On page 88: 'these are selectors are identical' has been changed to 'these selectors are +identical'

    + +
  • On page 109: 'The chome URL that the -moz-binding property points to' has been changed to 'The chrome URL that the -moz-binding property points to'

    +
- + +

Chapter 5

    @@ -74,20 +165,83 @@ 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'

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

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

    +
  • + +
  • On page 135: Example 5-11 has been changed to + -<li>On page 137: '<b class="broken">var connection = Components.classes ["@mozilla.org/network/ldap-connection;1";</b>' has been changed to + <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> + + <form name="form"> + <input type="button" value="Play Sound" onclick="play();"> + </form> + + + +
  • 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');'

    +
  • + +
+ + +

Chapter 6 + +

    + +
  • On page 145: Example 6-1 has been changed to
    + + +var myFile = "xFly.jar"; +initInstall( // initialize the installation + "Install xFly", // display name of installation + "xFly", // package name + "0.0.1", // version of install + 1); // flags - an optional argument, + // reserved for future use +f = getFolder("Chrome"); // specify a target directory +setPackageFolder(f); +addFile(myFile); // add software to the installation +registerChrome( + PACKAGE | DELAYED_CHROME, // chrome switch (i.e., type) + getFolder("Chrome","xFly.jar"), // destination of package + "content/xFly/"); // location of manifest in package +if (0 == getLastError( )) // if there have been no errors: + performInstall( ); // install "xfly.jar" +else // otherwise + cancelInstall( ); // cancel the installation. +
- + +

Chapter 8

    @@ -119,8 +273,8 @@ has been changed to type); -
  • On page 222: In Example 8-4 one of the duplicate 'dump(" ***** Registering: Simple JS component! ****\n");' lines -has 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 has been removed

    @@ -167,17 +321,54 @@ install:: $(TARGETS)
+ +

Chapter 9 + +

    + +
  • On page 257: In Example 9-7 + + + <triple subject="?listitem" + predicate=" http://xfly.mozdev.org/fly-rdf#location" + object="?location"/> + + +has been changed to + + + <triple subject="?listitem" + predicate="fly-location#location" + object="?location"/> + + +
- +

Chapter 10

    -
  • On page 297: 'http://www.jslib.mozdev.org' has been changed -to 'http://jslib.mozdev.org'

  • + +
  • On page 280: In Table 10-3 'Mostly used for retrieving, datasources, resources, and literals.' has been +changed to 'Mostly used for retrieving datasources, resources, and literals.'

    + +
  • On page 297: 'http://www.jslib.mozdev.org' has been changed to 'http://jslib.mozdev.org'

    + +
+ + + +

Chapter 11 + +

    +
  • On page 314: In Example 11-5 and Example 11-6 'var linetext = +document.createTextNode(messageParagraphs[i]);' has been changed to 'var linetext = +document.createTextNode(lines[i]);'

- +

Chapter 12

    @@ -192,21 +383,23 @@ to 'http://jslib.mozdev has been changed to (note the difference in indentation and in using a single quote versus a backtick) - print ' <checkbox label="%s" />' % form['op1'].value print ' <checkbox label="%s" />' % form['op2'].value print ' <checkbox label="%s" />' % form['op3'].value +
- +

Appendix A

    @@ -216,6 +409,17 @@ class="fixed">http://www.mozilla.org/sou
+ + +

Index + +

    + +
  • On page 437: 'Chimera, 2' has been changed to 'Camino, 2'

    + +
+ +