Annotation of books/www/corrections.html, revision 1.97

1.75      eric        1: <html><style>
1.91      david       2:   .broken { color: red; }
                      3:   .fixed { color: blue; }
1.52      petejc      4: </style>
                      5: 
1.75      eric        6: <body><p><b>Corrections</b>
1.1       david       7: 
1.21      david       8: <p>This page contains a list of corrections to be made in the next printing of
1.19      david       9: the book.  If you have suggestions for changes or find errors in the text,
1.22      david      10: feel free open a <a href="bugs.html">bug</a> with a report of the problem, post a message in the User Notes 
                     11: section on the chapter pages, or send a message to the <a
1.19      david      12: href="mailto:reviewers@mozdev.org">reviewers@mozdev.org</a> mailing list.
1.1       david      13: 
1.56      david      14: <p><b>Note:</b> All errors in the text and examples are shown in <b class="broken">red</b> and all corrections are shown in <b
1.90      petejc     15: class="fixed">blue</b>.
1.20      david      16: 
1.75      eric       17: <a name="preface"></a>
1.20      david      18: <p><b>Preface</b>
                     19: 
1.1       david      20: <ul>
1.18      david      21: 
1.80      david      22: <li>On page ix: '<b class="broken">other browsers such as Galeon and Chimera</b>' has been changed to '<b class="fixed">other browsers 
                     23: such as Galeon and Camino</b>'<br><br>
                     24: 
1.51      petejc     25: <li>On page xiv: '<b class="broken">http://www.oreilly.com/mozilla/</b>' has been changed
                     26: to '<b class="fixed">http://www.oreilly.com/catalog/mozilla/</b>'<br><br>
1.18      david      27: 
1.84      david      28: <li>On page xvii: '<b class="broken">David McNamara, and Mark Hammond</b>' has been changed to '<b class="fixed">David 
                     29: McNamara, Mark Hammond, Gary Frederick, and Andreas Halter</b>'<br><br>
                     30: 
1.80      david      31: <li>On page xvii: '<b class="broken">David Hyatt and Mike Pinkerton for the Chimera browser</b>' has been changed to '<b
                     32: class="fixed">David Hyatt and Mike Pinkerton for the Camino browser</b>'<br><br>
1.84      david      33: 
                     34: <li>On page xvii: '<b class="broken">including Kim Steckler, Rachel Oeschger, and Priscilla, Dylan, and Devon Collins</b>' has been
                     35: changed to '<b class="fixed">including Kim Steckler, Rachel Oeschger, Marjana Molan, Lia Molan King, and Priscilla, Dylan, and Devon
                     36: Collins</b>'<br><br>
1.80      david      37: 
1.20      david      38: </ul>
                     39: 
                     40: 
1.75      eric       41: <a name="ch1"></a>
1.20      david      42: <p><b>Chapter 1</b>
                     43: 
                     44: <ul>
                     45: 
1.80      david      46: <li>On page 2: In sidebar '<b class="broken">like Chimera (an ultra-fast browser that works only on Mac OS X)</b>' has been changed to 
                     47: '<b class="fixed">like Camino (an ultra-fast browser that works only on Mac OS X)</b>'<br><br>
                     48: 
1.74      david      49: <li>On page 7: In sidebar '<b class="broken">Another project, call m/b (short for mozilla/browser), addresses shortcomings</b>' has
                     50: been changed to '<b class="fixed">The Phoenix project (http://www.mozilla.org/projects/phoenix/) also addresses
                     51: shortcomings</b>'<br><br>
                     52: 
1.80      david      53: <li>On page 7: In sidebar '<b class="broken">Some examples include Chimera (http://chimera.mozdev.org)</b>' has been changed to '<b 
                     54: class="fixed">Some examples include Camino (http://www.mozilla.org/projects/camino/)</b>'<br><br>
1.74      david      55: 
1.53      david      56: <li>On page 7: '<b class="broken">applications web built using XPFE</b>' has been
                     57: changed to '<b class="fixed">applications built using XPFE</b>'<br><br>
1.18      david      58: 
1.20      david      59: </ul>
                     60: 
                     61: 
1.75      eric       62: <a name="ch2"></a>
1.20      david      63: <p><b>Chapter 2</b>
                     64: 
                     65: <ul>
                     66: 
1.57      david      67: <li>On page 10: Added a new sentence to the end of the 2nd paragraph of the xFly examples sidebar: '<b class="fixed">An installable version
1.58      david      68: of the complete xFly application can be found at http://xfly.mozdev.org.</b>'<br><br>
1.57      david      69: 
1.53      david      70: <li>On page 12: '<b class="broken">&lt;window
1.18      david      71: xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"  
1.53      david      72: /&gt;</b>' has been changed to '<b class="fixed">&lt;window
                     73: xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"&gt;</b>'<br><br>
1.18      david      74: 
1.64      david      75: <li>On page 14: In first code sample from Windows features section, '<b
                     76: class="broken">xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"&gt;</b>' has been changed to '<b
                     77: class="fixed">xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"</b>'<br><br>
1.18      david      78: 
1.53      david      79: <li>On page 17: '<b class="broken">selecting File > Open File > from</b>' has been
                     80: changed to '<b class="fixed">selecting File > Open File from</b>'<br><br>
1.18      david      81: 
1.53      david      82: <li>On page 20: '<b class="broken">CenterWindoOnScreen( ) function</b>' has been changed
                     83: to '<b class="fixed">CenterWindowOnScreen( ) function</b>'<br><br>
1.19      david      84: 
1.86      david      85: <li>On page 25: '<b class="broken">Under that directory, create the three new directories, <i>content</i>, <i>locale</i>, and <i>skin</i>, as
1.88      david      86: shown in Figure 2-5.</b>' has been changed to '<b class="fixed">Under that directory, create the three new directories, <i>content</i>,
1.86      david      87: <i>locale</i>, and <i>skin</i>, as shown in Figure 2-5. The <i>locale</i> directory will have the default 'en-US' language pack
1.87      david      88: structure.</b>'<br><br>
1.86      david      89: 
                     90: <li>On page 31: In Example 2-14 '<b class="broken">locale/</b>' has been changed to '<b class="fixed">locale/en-US/</b>'<br><br>
                     91: 
                     92: <li>On page 32: In Example 2-15 '<b class="broken">locale,install,url,resource:/chrome/xfly/locale/</b>' has been changed to '<b
                     93: class="fixed">locale,install,url,resource:/chrome/xfly/locale/en-US/</b>'<br><br>
                     94: 
1.20      david      95: </ul>
                     96: 
                     97: 
1.75      eric       98: <a name="ch3"></a>
1.20      david      99: <p><b>Chapter 3</b>
                    100: 
                    101: <ul>
                    102: 
1.67      david     103: <li>On page 34: '<b class="broken">We've packed a lot information in this chapter and it be a useful reference</b>' has been changed
                    104: to '<b class="fixed">We've packed a lot of information in this chapter and it will be a useful reference</b>'<br><br>
1.66      david     105: 
1.71      david     106: <li>On page 35: '<b class="broken">secondLevelNodes[I] = docEl.childNodes[i];</b>' has been changed to '<b 
                    107: class="fixed">secondLevelNodes[I] = docEl.childNodes[I];</b>'<br><br>
                    108: 
1.95      david     109: <li>On page 38: In Example 3-3 the namespace declarations have been changed to (note the addition of quotes and the removal of italics)
                    110: 
                    111: <xmp class="fixed">
                    112:     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
                    113:     xmlns:nc="http://home.netscape.com/NC-rdf#">
                    114: </xmp>
                    115: 
1.96      david     116: <li>On page 38: In Example 3-3 '<b class="broken">&lt;image src="page1.png"&gt;</b>' has been changed to '<b class="fixed">&lt;image 
                    117: src="page1.png"/&gt;</b>'<br><br>
                    118: 
1.54      david     119: <li>On page 40: '<b class="broken">&lt;toolbarbutton id="printBtn" label="Open"
                    120: oncommand="doPrint( );" /&gt</b>' has been changed to '<b class="fixed">&lt;toolbarbutton
                    121: id="printBtn" label="Print" oncommand="doPrint( );" &gt</b>'<br><br>
1.18      david     122: 
1.65      david     123: <li>On page 51: '<b class="broken">&lt;decription&gt;The mozdev.org site [...] your own development project&lt;/decription&gt;</b>' has been 
                    124: changed to '<b class="fixed">&lt;description&gt;The mozdev.org site [...] your own development project&lt;/description&gt;</b>'<br><br>
1.71      david     125: 
                    126: <li>On pages 58 and 59: Example 3-15 has been changed to (note the addition of spaces to seperate values)
                    127: 
                    128: <xmp class="fixed">
                    129: <?xml version="1.0"?>
                    130: <window id="hello-goodbye"
                    131:     title="Hello Goodbye"
                    132:     xmlns:html="http://www.w3.org/1999/xhtml"
                    133:     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
                    134:     style="min-width:100px;min-height:100px;background-color:white;">
                    135:   <broadcasterset id="broadcasterset">
                    136:     <broadcaster id="cmd_hello" oncommand="alert('Hello There!');"/>
                    137:   </broadcasterset>
                    138:   <keyset id="keyset">
                    139:     <key id="key_h" key="H" observes="cmd_hello" modifiers="accel,shift" />
                    140:     <key id="key_g" key="G" command="cmd_goodbye" modifiers="accel,shift" />
                    141:   </keyset>
                    142:   <commandset id="commandset">
                    143:     <command id="cmd_goodbye" oncommand="alert('Goodbye!');" />
                    144:   </commandset>
                    145:   <spacer flex="1"/>
                    146:   <label value="hello/goodbye"/>
                    147:   <textbox value="type ctl+shft+h"/>
                    148:   <textbox value="type ctl+shft+g"/>
                    149:   <spacer flex="1"/>
                    150: </window>
                    151: </xmp>
1.65      david     152: 
1.20      david     153: </ul>
                    154: 
1.72      david     155: 
1.75      eric      156: <a name="ch4"></a>
1.72      david     157: <p><b>Chapter 4</b>
                    158: 
                    159: <ul>
                    160: 
                    161: <li>On page 88: '<b class="broken">these are selectors are identical</b>' has been changed to '<b class="fixed">these selectors are 
                    162: identical</b>'<br><br>
                    163: 
1.73      david     164: <li>On page 109: '<b class="broken">The chome URL that the -moz-binding property points to</b>' has been changed to '<b
                    165: class="fixed">The chrome URL that the -moz-binding property points to</b>'<br><br>
                    166: 
1.72      david     167: </ul>
                    168: 
                    169: 
1.75      eric      170: <a name="ch5"></a>
1.26      petejc    171: <p><b>Chapter 5</b>
                    172: 
                    173: <ul>
1.40      david     174: 
                    175: <li>On page 113: Javascript 1.5 reference link in footnote has been changed from 
1.54      david     176: '<b class="broken">http://developer.netscape.com/docs/manuals/js/core/jsref15/contents.html</b>' to
                    177: '<b class="fixed">http://developer.netscape.com/docs/manuals/index.html?content=javascript.html</b>'<br><br>
1.59      petejc    178: </li>
1.40      david     179: 
1.54      david     180: <li>On page 120: '<b class="broken">&lt;/script.</b>' has been changed to '<b class="fixed">&lt;/script&gt;</b>'<br><br>
1.59      petejc    181: </li>
1.41      david     182: 
1.54      david     183: <li>On page 120: '<b class="broken">dump(l+'\n');</b>' has been changed to '<b class="fixed">dump(len+'\n');</b>'<br><br>
1.59      petejc    184: </li>
1.41      david     185: 
1.61      david     186: <li>On page 135: Example 5-11 has been changed to
                    187: <xmp class="fixed">
1.59      petejc    188:   <head>
                    189:     <title>Sound Service Play Example</title>
                    190:     <script>  
                    191:       function play() { 
                    192:         netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 
                    193:         var sample = Components.classes["@mozilla.org/sound;1"].createInstance(); 
                    194:         sample = sample.QueryInterface(Components.interfaces.nsISound); 
1.62      petejc    195:         const SND_NETWORK_STD_CID = "@mozilla.org/network/standard-url;1";
                    196:         const SND_I_URL           = "nsIURL";
                    197:         const SND_URL             = new  C.Constructor(SND_NETWORK_STD_CID, SND_I_URL);
                    198:         var url                   = new SND_URL();
                    199:         url.spec                  = 'http://jslib.mozdev.org/test.wav';
                    200:         sample.play(url);
1.59      petejc    201:       } 
                    202:     </script>  
                    203:   </head>  
1.75      eric      204:     
1.59      petejc    205:     <form name="form">  
                    206:       <input type="button" value="Play Sound" onclick="play();">  
1.63      petejc    207:     </form>  
1.76      brian     208: </xmp>
                    209: 
                    210: <li>On page 137: '<b class="broken">var connection = Components.classes ["@mozilla.org/network/ldap-connection;1";</b>' 
                    211:   has been changed to 
1.61      david     212: '<b class="fixed">var connection = Components.classes ["@mozilla.org/network/ldap-connection;1"];</b>'<br><br>
1.59      petejc    213: </li>
1.43      david     214: 
1.54      david     215: <li>On page 140: '<b class="broken">js> load(`chrome/jslib/jslib.js');</b>' has been changed to '<b class="fixed">js>
                    216: load('chrome/jslib/jslib.js');</b>'<br><br>
1.59      petejc    217: </li>
1.43      david     218: 
1.85      david     219: </ul>
                    220: 
                    221: <a name="ch06"></a>
                    222: <p><b>Chapter 6</b>
                    223: 
                    224: <ul>
                    225: 
                    226: <li>On page 145: Example 6-1 has been changed to <br/>
                    227: 
                    228: <xmp class="fixed">
                    229: var myFile = "xFly.jar";
                    230: initInstall(                      // initialize the installation
                    231:   "Install xFly",                 // display name of installation
                    232:   "xFly",                         // package name
                    233:   "0.0.1",                        // version of install
                    234:   1);                             // flags - an optional argument, 
                    235:                                   // reserved for future use
                    236: f = getFolder("Chrome");         // specify a target directory
                    237: setPackageFolder(f);
                    238: addFile(myFile);                 // add software to the installation
                    239: registerChrome(
                    240:   PACKAGE | DELAYED_CHROME,       // chrome switch (i.e., type)
                    241:   getFolder("Chrome","xFly.jar"), // destination of package
                    242:   "content/xFly/");               // location of manifest in package
                    243: if (0 == getLastError( ))        // if there have been no errors:
                    244:   performInstall( );             // install "xfly.jar"
                    245: else                             // otherwise
                    246:   cancelInstall( );              // cancel the installation.
                    247: </xmp>
                    248: 
                    249: </ul>
                    250: 
1.75      eric      251: 
                    252: <a name="ch08"></a>
1.24      petejc    253: <p><b>Chapter 8</b>
                    254: 
                    255: <ul>
1.44      david     256: 
1.93      petejc    257: <li>On page 211: In 2nd sentence of paragraph '<b class="broken">QueryInterace</b>' has been 
                    258: changed to '<b class="fixed">QueryInterface</b>'<br><br></li>
1.44      david     259: 
1.94      petejc    260: <li>On page 222: In Example 8-4 has been changed to:
1.45      david     261: 
1.97    ! david     262: <xmp class="fixed">
1.92      petejc    263: function SimpleComponent(){}
                    264: 
                    265: SimpleComponent.prototype = {
                    266: 
                    267:     get yourName()        { return this.mName; },
                    268:     set yourName(aName)   { return this.mName = aName; },
                    269: 
                    270:     write: function () { dump("Hello " + this.mName + "\n"); },
                    271:     change: function (aValue) { this.mName = aValue; },
                    272:     mName: "a default value",
                    273: 
                    274:     QueryInterface: function (iid) {
                    275:         if (!iid.equals(Components.interfaces.nsISimple)
                    276:             && !iid.equals(Components.interfaces.nsISupports))
                    277:         {
                    278:             throw Components.results.NS_ERROR_NO_INTERFACE;
                    279:         }
                    280:         return this;
                    281:     }
                    282: }
                    283: 
                    284: var Module = {
                    285:     firstTime: true,
                    286: 
                    287:     registerSelf: function (compMgr, fileSpec, location, type) {
                    288:         if (this.firstTime) {
                    289:             dump("*** Deferring registration of simple JS components\n");
                    290:             this.firstTime = false;
                    291:             throw Components.results.NS_ERROR_FACTORY_REGISTER_AGAIN;
                    292:         }
                    293:         debug("*** Registering sample JS components\n");
                    294:         compMgr =
                    295: compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
                    296:         compMgr.registerFactoryLocation(this.myCID,
                    297:                                         "Simple JS Component",
                    298:                                         this.myProgID,
                    299:                                         fileSpec,
                    300:                                         location,
                    301:                                         type);
                    302:     },
                    303: 
                    304:     getClassObject : function (compMgr, cid, iid) {
                    305:         if (!cid.equals(this.myCID))
                    306:         throw Components.results.NS_ERROR_NO_INTERFACE
                    307:         if (!iid.equals(Components.interfaces.nsIFactory))
                    308:         throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
                    309:         return this.myFactory;
                    310:     },
                    311: 
                    312:     myCID: Components.ID("{98aa9afd-8b08-415b-91ed-01916a130d16}"),
                    313:     myProgID: "@mozilla.org/js_simple_component;1",
                    314: 
                    315:     myFactory: {
                    316:         createInstance: function (outer, iid) {
                    317:             dump("CI: " + iid + "\n");
                    318:             if (outer != null)
                    319:             throw Components.results.NS_ERROR_NO_AGGREGATION;
                    320:             return (new SimpleComponent()).QueryInterface(iid);
                    321:         }
                    322:     },
                    323: 
                    324:     canUnload: function(compMgr) {
                    325:         dump("****** Unloading: Simple JS component! ****** \n");
                    326:         return true;
                    327:     }
                    328: }; // END Module
                    329: 
                    330: function NSGetModule(compMgr, fileSpec) { return Module; }
                    331: </xmp>
                    332: </li>
                    333: 
                    334: <li>On page 239: Example 8-15 has been changed to <br/></li>
1.25      petejc    335: 
1.54      david     336: <xmp class="fixed">
1.24      petejc    337: DEPTH         = ../../..
                    338: topsrcdir     = ../../..
                    339: srcdir        = .
                    340: VPATH         = .
                    341: 
                    342: include $(DEPTH)/config/autoconf.mk
                    343: 
                    344: MODULE        = xpcom
                    345: XPIDL_MODULE  = simple
                    346: LIBRARY_NAME  = simple
                    347: IS_COMPONENT  = 1
                    348: MODULE_NAME   = nsSimpleModule
                    349: REQUIRES      = string \
                    350:                 xpcom \
                    351:                 $(NULL)
                    352: 
                    353: 
                    354: CPPSRCS   =              \
                    355:     nsSimple.cpp         \
                    356:     nsSimpleModule.cpp   \
                    357:     $(NULL)
                    358: 
                    359: XPIDLSRCS = nsISimple.idl
                    360: 
                    361: include $(topsrcdir)/config/config.mk
                    362: 
                    363: LIBS    +=        \
                    364:     $(XPCOM_LIBS) \
                    365:     $(NSPR_LIBS)  \
                    366:     $(NULL)
                    367: 
                    368: include $(topsrcdir)/config/rules.mk
                    369: 
                    370: EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
                    371: 
                    372: install:: $(TARGETS)
1.25      petejc    373: </xmp>
1.24      petejc    374: 
                    375: </ul>
                    376: 
1.75      eric      377: <a name="ch9"></a>
                    378: <p><b>Chapter 9</b>
1.20      david     379: 
1.75      eric      380: <ul>
1.79      david     381: 
                    382: <li>On page 257: In Example 9-7
                    383: 
                    384: <xmp class="broken">
                    385:        <triple subject="?listitem"
                    386:                predicate=" http://xfly.mozdev.org/fly-rdf#location"
                    387:                object="?location"/>
                    388: </xmp>
                    389: 
                    390: has been changed to
                    391: 
                    392: <xmp class="fixed">
                    393:         <triple subject="?listitem"
                    394:                predicate="fly-location#location"
                    395:                 object="?location"/>
                    396: </xmp>
                    397: 
1.75      eric      398: </ul>
                    399: 
                    400: <a name="ch10"></a>
1.20      david     401: <p><b>Chapter 10</b>
                    402: 
                    403: <ul>
1.77      david     404: 
1.78      david     405: <li>On page 280: In Table 10-3 '<b class="broken">Mostly used for retrieving, datasources, resources, and literals.</b>' has been
                    406: changed to '<b class="fixed">Mostly used for retrieving datasources, resources, and literals.</b>'<br><br>
1.77      david     407: 
                    408: <li>On page 297: '<b class="broken">http://www.jslib.mozdev.org</b>' has been changed to '<b
                    409: class="fixed">http://jslib.mozdev.org</b>'<br><br>
                    410: 
1.68      david     411: </ul>
                    412: 
                    413: 
1.75      eric      414: <a name="ch11"></a>
1.69      david     415: <p><b>Chapter 11</b>
1.68      david     416: 
1.70      david     417: <ul> 
                    418: <li>On page 314: In Example 11-5 and Example 11-6 '<b class="broken">var linetext =
                    419: document.createTextNode(messageParagraphs[i]);</b>' has been changed to '<b class="fixed">var linetext =
                    420: document.createTextNode(lines[i]);</b>'<br><br>
1.20      david     421: </ul>
                    422: 
                    423: 
1.75      eric      424: <a name="ch12"></a>
1.20      david     425: <p><b>Chapter 12</b>
                    426: 
                    427: <ul>
                    428: 
1.47      david     429: <li>On page 336: In Example 12-6
1.20      david     430: 
1.54      david     431: <xmp class="broken">
1.38      petejc    432:  print `  <checkbox label="%s" />' % form['op1'].value
                    433:  print `  <checkbox label="%s" />' % form['op2'].value
                    434:    print `  <checkbox label="%s" />' % form['op3'].value
1.47      david     435: </xmp>
                    436: 
1.48      david     437: has been changed to (note the difference in indentation and in using a single quote versus a backtick)
1.47      david     438: 
1.55      david     439: <xmp class="fixed">
1.48      david     440:    print '  <checkbox label="%s" />' % form['op1'].value
                    441:    print '  <checkbox label="%s" />' % form['op2'].value
1.38      petejc    442:    print '  <checkbox label="%s" />' % form['op3'].value
                    443: </xmp>
1.47      david     444: 
1.81      david     445: <!--
1.47      david     446: <li>On page 339: A new 'Certificate Authorities and Digital
                    447: Signatures' section is being written with drafts available on <a
                    448: href="http://certs.mozdev.org">http://certs.mozdev.org</a><br><br>
1.38      petejc    449: </li>
1.81      david     450: -->
1.47      david     451: 
1.20      david     452: </ul>
                    453: 
                    454: 
1.75      eric      455: <a name="appa"></a>
1.20      david     456: <p><b>Appendix A</b>
                    457: 
                    458: <ul>
1.18      david     459: 
1.54      david     460: <li>On page 365: '<b class="broken">http://www.mozilla.org/source.tml</b>' has been changed to '<b
                    461: class="fixed">http://www.mozilla.org/source.html</b>'<br><br>
1.18      david     462: 
1.1       david     463: </ul>
1.2       david     464: 
1.81      david     465: 
                    466: <a name="index"></a>
                    467: <p><b>Index</b>
                    468: 
                    469: <ul>
                    470: 
1.83      david     471: <li>On page 437: '<b class="broken">Chimera, 2</b>' has been changed to '<b class="fixed">Camino, 2</b>'<br><br>
1.81      david     472: 
                    473: </ul>
1.75      eric      474: 
1.82      david     475: 
                    476: <br><br>
                    477: 
                    478: <!-- ?php require(NOTES); ? -->
                    479: <?php $post_to_list=NO; $author='reviewers@mozdev.org'; $target_page='corrections'; require(NOTES); ?>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>