--- books/www/corrections.html 2002/10/04 21:21:02 1.15 +++ books/www/corrections.html 2003/03/13 17:16:39 1.86 @@ -1,28 +1,426 @@ -

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, +feel free open a bug with a report of the problem, post a message in the User Notes +section on the chapter pages, or send a message to the reviewers@mozdev.org mailing list. -

This page contains a list of corrections made to the original text of the book. If you have suggestions for changes or find errors -in the text, feel free to post a note below 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

+ -
  • In Chapter 1 (p 7) 'applications web built using XPFE' has been changed to 'applications built using XPFE'

    + +

    Chapter 1 -

  • In Chapter 2 (p 14) Removed an extra '>' from example code

    + -

    - + +

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

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

      + +
    • 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 + + + this.myCID, + "My JS Component", + this.myProgID, fileSpec, + location, true, true, + type); + + +has been changed to + + + compMgr.registerComponentWithType( + this.myCID, + "My JS Component", + this.myProgID, fileSpec, + location, true, true, + type); + + +
    • 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

      + +
    • On page 239: Example 8-15 has been changed to
      + + +DEPTH = ../../.. +topsrcdir = ../../.. +srcdir = . +VPATH = . + +include $(DEPTH)/config/autoconf.mk + +MODULE = xpcom +XPIDL_MODULE = simple +LIBRARY_NAME = simple +IS_COMPONENT = 1 +MODULE_NAME = nsSimpleModule +REQUIRES = string \ + xpcom \ + $(NULL) + + +CPPSRCS = \ + nsSimple.cpp \ + nsSimpleModule.cpp \ + $(NULL) + +XPIDLSRCS = nsISimple.idl + +include $(topsrcdir)/config/config.mk + +LIBS += \ + $(XPCOM_LIBS) \ + $(NSPR_LIBS) \ + $(NULL) + +include $(topsrcdir)/config/rules.mk + +EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) + +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 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 + +

      + +
    • On page 336: In Example 12-6 + + + print ` <checkbox label="%s" />' % form['op1'].value + print ` <checkbox label="%s" />' % form['op2'].value + print ` <checkbox label="%s" />' % form['op3'].value + + +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 + +

      + +
    • On page 365: 'http://www.mozilla.org/source.tml' has been changed to 'http://www.mozilla.org/source.html'

      + +
    + + + +

    Index + +

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

      + +
    + + +

    - + +