Diff for /books/www/corrections.html between versions 1.87 and 1.96

version 1.87, 2003/03/13 17:17:50 version 1.96, 2003/03/14 15:45:05
Line 1 Line 1
 <html><style>  <html><style>
   .broken { color: red; }    .broken { color: red; }
  .fixed { color: green; }  .fixed { color: blue; }
 </style>  </style>
   
 <body><p><b>Corrections</b>  <body><p><b>Corrections</b>
Line 12  section on the chapter pages, or send a  Line 12  section on the chapter pages, or send a 
 href="mailto:reviewers@mozdev.org">reviewers@mozdev.org</a> mailing list.  href="mailto:reviewers@mozdev.org">reviewers@mozdev.org</a> mailing list.
   
 <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  <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
class="fixed">green</b>.class="fixed">blue</b>.
   
 <a name="preface"></a>  <a name="preface"></a>
 <p><b>Preface</b>  <p><b>Preface</b>
Line 83  changed to '<b class="fixed">selecting F Line 83  changed to '<b class="fixed">selecting F
 to '<b class="fixed">CenterWindowOnScreen( ) function</b>'<br><br>  to '<b class="fixed">CenterWindowOnScreen( ) function</b>'<br><br>
   
 <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  <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
shown in Figure 2-5.' has been changed to '<b class="fixed">Under that directory, create the three new directories, <i>content</i>,shown in Figure 2-5.</b>' has been changed to '<b class="fixed">Under that directory, create the three new directories, <i>content</i>,
 <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  <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
 structure.</b>'<br><br>  structure.</b>'<br><br>
   
Line 106  to '<b class="fixed">We've packed a lot  Line 106  to '<b class="fixed">We've packed a lot 
 <li>On page 35: '<b class="broken">secondLevelNodes[I] = docEl.childNodes[i];</b>' has been changed to '<b   <li>On page 35: '<b class="broken">secondLevelNodes[I] = docEl.childNodes[i];</b>' has been changed to '<b 
 class="fixed">secondLevelNodes[I] = docEl.childNodes[I];</b>'<br><br>  class="fixed">secondLevelNodes[I] = docEl.childNodes[I];</b>'<br><br>
   
   <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)
   
   <xmp class="fixed">
       xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
       xmlns:nc="http://home.netscape.com/NC-rdf#">
   </xmp>
   
   <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 
   src="page1.png"/&gt;</b>'<br><br>
   
 <li>On page 40: '<b class="broken">&lt;toolbarbutton id="printBtn" label="Open"  <li>On page 40: '<b class="broken">&lt;toolbarbutton id="printBtn" label="Open"
 oncommand="doPrint( );" /&gt</b>' has been changed to '<b class="fixed">&lt;toolbarbutton  oncommand="doPrint( );" /&gt</b>' has been changed to '<b class="fixed">&lt;toolbarbutton
 id="printBtn" label="Print" oncommand="doPrint( );" &gt</b>'<br><br>  id="printBtn" label="Print" oncommand="doPrint( );" &gt</b>'<br><br>
Line 175  class="fixed">The chrome URL that the -m Line 185  class="fixed">The chrome URL that the -m
   
 <li>On page 135: Example 5-11 has been changed to  <li>On page 135: Example 5-11 has been changed to
 <xmp class="fixed">  <xmp class="fixed">
   
   <head>    <head>
     <title>Sound Service Play Example</title>      <title>Sound Service Play Example</title>
     <script>        <script>  
Line 196  class="fixed">The chrome URL that the -m Line 205  class="fixed">The chrome URL that the -m
     <form name="form">        <form name="form">  
       <input type="button" value="Play Sound" onclick="play();">          <input type="button" value="Play Sound" onclick="play();">  
     </form>        </form>  
   
 </xmp>  </xmp>
   
 <li>On page 137: '<b class="broken">var connection = Components.classes ["@mozilla.org/network/ldap-connection;1";</b>'   <li>On page 137: '<b class="broken">var connection = Components.classes ["@mozilla.org/network/ldap-connection;1";</b>' 
Line 246  else                          // otherwi Line 254  else                          // otherwi
   
 <ul>  <ul>
   
<li>On page 211: In 2nd sentence of paragraph '<b class="broken">QueryInterace</b>' has been changed to '<b <li>On page 211: In 2nd sentence of paragraph '<b class="broken">QueryInterace</b>' has been 
class="fixed">QueryInterface</b>'<br><br>changed to '<b class="fixed">QueryInterface</b>'<br><br></li>
   
<li>On page 222: In Example 8-4 '<b class="broken">mName: "a default value"</b>' has been changed to '<b class="fixed">mName: "a default <li>On page 222: In Example 8-4 '<b class="broken">mName: "a default value"</b>' has been 
value",</b>'<br><br>changed to '<b class="fixed">mName: "a default value",</b>'<br><br></li>
   
<li>On page 222: In Example 8-4<li>On page 222: In Example 8-4:
   
             <xmp class="broken">              <xmp class="broken">
               this.myCID,                this.myCID,
Line 273  has been changed to Line 281  has been changed to
               type);                type);
             </xmp>                          </xmp>            
   
   </li>
   
 <li>On page 222: In Example 8-4 one of the duplicate '<b class="broken">dump(" ***** Registering: Simple JS component!  <li>On page 222: In Example 8-4 one of the duplicate '<b class="broken">dump(" ***** Registering: Simple JS component!
****\n");</b>' lines has been removed<br><br>****\n");</b>' lines has been removed<br><br></li>
 
 <li>On page 222: In Example 8-4 has been changed to:
 
 <xmp>
 
 function SimpleComponent(){}
 
 SimpleComponent.prototype = {
 
     get yourName()        { return this.mName; },
     set yourName(aName)   { return this.mName = aName; },
 
     write: function () { dump("Hello " + this.mName + "\n"); },
     change: function (aValue) { this.mName = aValue; },
     mName: "a default value",
 
     QueryInterface: function (iid) {
         if (!iid.equals(Components.interfaces.nsISimple)
             && !iid.equals(Components.interfaces.nsISupports))
         {
             throw Components.results.NS_ERROR_NO_INTERFACE;
         }
         return this;
     }
 }
 
 var Module = {
     firstTime: true,
 
     registerSelf: function (compMgr, fileSpec, location, type) {
         if (this.firstTime) {
             dump("*** Deferring registration of simple JS components\n");
             this.firstTime = false;
             throw Components.results.NS_ERROR_FACTORY_REGISTER_AGAIN;
         }
         debug("*** Registering sample JS components\n");
         compMgr =
 compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
         compMgr.registerFactoryLocation(this.myCID,
                                         "Simple JS Component",
                                         this.myProgID,
                                         fileSpec,
                                         location,
                                         type);
     },
 
     getClassObject : function (compMgr, cid, iid) {
         if (!cid.equals(this.myCID))
         throw Components.results.NS_ERROR_NO_INTERFACE
         if (!iid.equals(Components.interfaces.nsIFactory))
         throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
         return this.myFactory;
     },
 
     myCID: Components.ID("{98aa9afd-8b08-415b-91ed-01916a130d16}"),
     myProgID: "@mozilla.org/js_simple_component;1",
 
     myFactory: {
         createInstance: function (outer, iid) {
             dump("CI: " + iid + "\n");
             if (outer != null)
             throw Components.results.NS_ERROR_NO_AGGREGATION;
             return (new SimpleComponent()).QueryInterface(iid);
         }
     },
 
     canUnload: function(compMgr) {
         dump("****** Unloading: Simple JS component! ****** \n");
         return true;
     }
 }; // END Module
 
 function NSGetModule(compMgr, fileSpec) { return Module; }
 
 </xmp>
 <br><br>
 </li>
   
 <li>On page 223: In Example 8-4 one of the duplicate '<b class="broken">if (outer != null)</b>' lines has been removed<br><br>  <li>On page 223: In Example 8-4 one of the duplicate '<b class="broken">if (outer != null)</b>' lines has been removed<br><br>
   
<li>On page 239: Example 8-15 has been changed to <br/><li>On page 222: In Example 8-4 has been changed to:</li>
 <li>On page 239: Example 8-15 has been changed to <br/></li>
   
 <xmp class="fixed">  <xmp class="fixed">
 DEPTH         = ../../..  DEPTH         = ../../..

Removed from v.1.87  
changed lines
  Added in v.1.96


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