1: <html><style>
2: .broken { color: red; }
3: .fixed { color: blue; }
4: </style>
5:
6: <body><p><b>Corrections</b>
7:
8: <p>This page contains a list of corrections to be made in the next printing of
9: the book. If you have suggestions for changes or find errors in the text,
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
12: href="mailto:reviewers@mozdev.org">reviewers@mozdev.org</a> mailing list.
13:
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
15: class="fixed">blue</b>.
16:
17: <a name="preface"></a>
18: <p><b>Preface</b>
19:
20: <ul>
21:
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:
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>
27:
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:
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>
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>
37:
38: </ul>
39:
40:
41: <a name="ch1"></a>
42: <p><b>Chapter 1</b>
43:
44: <ul>
45:
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:
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:
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>
55:
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>
58:
59: </ul>
60:
61:
62: <a name="ch2"></a>
63: <p><b>Chapter 2</b>
64:
65: <ul>
66:
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
68: of the complete xFly application can be found at http://xfly.mozdev.org.</b>'<br><br>
69:
70: <li>On page 12: '<b class="broken"><window
71: xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
72: /></b>' has been changed to '<b class="fixed"><window
73: xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"></b>'<br><br>
74:
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"></b>' has been changed to '<b
77: class="fixed">xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"</b>'<br><br>
78:
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>
81:
82: <li>On page 20: '<b class="broken">CenterWindoOnScreen( ) function</b>' has been changed
83: to '<b class="fixed">CenterWindowOnScreen( ) function</b>'<br><br>
84:
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
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>,
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
88: structure.</b>'<br><br>
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:
95: </ul>
96:
97:
98: <a name="ch3"></a>
99: <p><b>Chapter 3</b>
100:
101: <ul>
102:
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>
105:
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:
109: <li>On page 40: '<b class="broken"><toolbarbutton id="printBtn" label="Open"
110: oncommand="doPrint( );" /></b>' has been changed to '<b class="fixed"><toolbarbutton
111: id="printBtn" label="Print" oncommand="doPrint( );" ></b>'<br><br>
112:
113: <li>On page 51: '<b class="broken"><decription>The mozdev.org site [...] your own development project</decription></b>' has been
114: changed to '<b class="fixed"><description>The mozdev.org site [...] your own development project</description></b>'<br><br>
115:
116: <li>On pages 58 and 59: Example 3-15 has been changed to (note the addition of spaces to seperate values)
117:
118: <xmp class="fixed">
119: <?xml version="1.0"?>
120: <window id="hello-goodbye"
121: title="Hello Goodbye"
122: xmlns:html="http://www.w3.org/1999/xhtml"
123: xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
124: style="min-width:100px;min-height:100px;background-color:white;">
125: <broadcasterset id="broadcasterset">
126: <broadcaster id="cmd_hello" oncommand="alert('Hello There!');"/>
127: </broadcasterset>
128: <keyset id="keyset">
129: <key id="key_h" key="H" observes="cmd_hello" modifiers="accel,shift" />
130: <key id="key_g" key="G" command="cmd_goodbye" modifiers="accel,shift" />
131: </keyset>
132: <commandset id="commandset">
133: <command id="cmd_goodbye" oncommand="alert('Goodbye!');" />
134: </commandset>
135: <spacer flex="1"/>
136: <label value="hello/goodbye"/>
137: <textbox value="type ctl+shft+h"/>
138: <textbox value="type ctl+shft+g"/>
139: <spacer flex="1"/>
140: </window>
141: </xmp>
142:
143: </ul>
144:
145:
146: <a name="ch4"></a>
147: <p><b>Chapter 4</b>
148:
149: <ul>
150:
151: <li>On page 88: '<b class="broken">these are selectors are identical</b>' has been changed to '<b class="fixed">these selectors are
152: identical</b>'<br><br>
153:
154: <li>On page 109: '<b class="broken">The chome URL that the -moz-binding property points to</b>' has been changed to '<b
155: class="fixed">The chrome URL that the -moz-binding property points to</b>'<br><br>
156:
157: </ul>
158:
159:
160: <a name="ch5"></a>
161: <p><b>Chapter 5</b>
162:
163: <ul>
164:
165: <li>On page 113: Javascript 1.5 reference link in footnote has been changed from
166: '<b class="broken">http://developer.netscape.com/docs/manuals/js/core/jsref15/contents.html</b>' to
167: '<b class="fixed">http://developer.netscape.com/docs/manuals/index.html?content=javascript.html</b>'<br><br>
168: </li>
169:
170: <li>On page 120: '<b class="broken"></script.</b>' has been changed to '<b class="fixed"></script></b>'<br><br>
171: </li>
172:
173: <li>On page 120: '<b class="broken">dump(l+'\n');</b>' has been changed to '<b class="fixed">dump(len+'\n');</b>'<br><br>
174: </li>
175:
176: <li>On page 135: Example 5-11 has been changed to
177: <xmp class="fixed">
178:
179: <head>
180: <title>Sound Service Play Example</title>
181: <script>
182: function play() {
183: netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
184: var sample = Components.classes["@mozilla.org/sound;1"].createInstance();
185: sample = sample.QueryInterface(Components.interfaces.nsISound);
186: const SND_NETWORK_STD_CID = "@mozilla.org/network/standard-url;1";
187: const SND_I_URL = "nsIURL";
188: const SND_URL = new C.Constructor(SND_NETWORK_STD_CID, SND_I_URL);
189: var url = new SND_URL();
190: url.spec = 'http://jslib.mozdev.org/test.wav';
191: sample.play(url);
192: }
193: </script>
194: </head>
195:
196: <form name="form">
197: <input type="button" value="Play Sound" onclick="play();">
198: </form>
199:
200: </xmp>
201:
202: <li>On page 137: '<b class="broken">var connection = Components.classes ["@mozilla.org/network/ldap-connection;1";</b>'
203: has been changed to
204: '<b class="fixed">var connection = Components.classes ["@mozilla.org/network/ldap-connection;1"];</b>'<br><br>
205: </li>
206:
207: <li>On page 140: '<b class="broken">js> load(`chrome/jslib/jslib.js');</b>' has been changed to '<b class="fixed">js>
208: load('chrome/jslib/jslib.js');</b>'<br><br>
209: </li>
210:
211: </ul>
212:
213: <a name="ch06"></a>
214: <p><b>Chapter 6</b>
215:
216: <ul>
217:
218: <li>On page 145: Example 6-1 has been changed to <br/>
219:
220: <xmp class="fixed">
221: var myFile = "xFly.jar";
222: initInstall( // initialize the installation
223: "Install xFly", // display name of installation
224: "xFly", // package name
225: "0.0.1", // version of install
226: 1); // flags - an optional argument,
227: // reserved for future use
228: f = getFolder("Chrome"); // specify a target directory
229: setPackageFolder(f);
230: addFile(myFile); // add software to the installation
231: registerChrome(
232: PACKAGE | DELAYED_CHROME, // chrome switch (i.e., type)
233: getFolder("Chrome","xFly.jar"), // destination of package
234: "content/xFly/"); // location of manifest in package
235: if (0 == getLastError( )) // if there have been no errors:
236: performInstall( ); // install "xfly.jar"
237: else // otherwise
238: cancelInstall( ); // cancel the installation.
239: </xmp>
240:
241: </ul>
242:
243:
244: <a name="ch08"></a>
245: <p><b>Chapter 8</b>
246:
247: <ul>
248:
249: <li>On page 211: In 2nd sentence of paragraph '<b class="broken">QueryInterace</b>' has been
250: changed to '<b class="fixed">QueryInterface</b>'<br><br></li>
251:
252: <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
253: value",</b>'<br><br></li>
254:
255: <li>On page 222: In Example 8-4
256:
257: <xmp class="broken">
258: this.myCID,
259: "My JS Component",
260: this.myProgID, fileSpec,
261: location, true, true,
262: type);
263: </xmp>
264:
265: has been changed to
266:
267: <xmp class="fixed">
268: compMgr.registerComponentWithType(
269: this.myCID,
270: "My JS Component",
271: this.myProgID, fileSpec,
272: location, true, true,
273: type);
274: </xmp>
275:
276: </li>
277:
278: <li>On page 222: In Example 8-4 one of the duplicate '<b class="broken">dump(" ***** Registering: Simple JS component!
279: ****\n");</b>' lines has been removed<br><br>
280:
281: <xmp>
282:
283: function SimpleComponent(){}
284:
285: SimpleComponent.prototype = {
286:
287: get yourName() { return this.mName; },
288: set yourName(aName) { return this.mName = aName; },
289:
290: write: function () { dump("Hello " + this.mName + "\n"); },
291: change: function (aValue) { this.mName = aValue; },
292: mName: "a default value",
293:
294: QueryInterface: function (iid) {
295: if (!iid.equals(Components.interfaces.nsISimple)
296: && !iid.equals(Components.interfaces.nsISupports))
297: {
298: throw Components.results.NS_ERROR_NO_INTERFACE;
299: }
300: return this;
301: }
302: }
303:
304: var Module = {
305: firstTime: true,
306:
307: registerSelf: function (compMgr, fileSpec, location, type) {
308: if (this.firstTime) {
309: dump("*** Deferring registration of simple JS components\n");
310: this.firstTime = false;
311: throw Components.results.NS_ERROR_FACTORY_REGISTER_AGAIN;
312: }
313: debug("*** Registering sample JS components\n");
314: compMgr =
315: compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
316: compMgr.registerFactoryLocation(this.myCID,
317: "Simple JS Component",
318: this.myProgID,
319: fileSpec,
320: location,
321: type);
322: },
323:
324: getClassObject : function (compMgr, cid, iid) {
325: if (!cid.equals(this.myCID))
326: throw Components.results.NS_ERROR_NO_INTERFACE
327: if (!iid.equals(Components.interfaces.nsIFactory))
328: throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
329: return this.myFactory;
330: },
331:
332: myCID: Components.ID("{98aa9afd-8b08-415b-91ed-01916a130d16}"),
333: myProgID: "@mozilla.org/js_simple_component;1",
334:
335: myFactory: {
336: createInstance: function (outer, iid) {
337: dump("CI: " + iid + "\n");
338: if (outer != null)
339: throw Components.results.NS_ERROR_NO_AGGREGATION;
340: return (new SimpleComponent()).QueryInterface(iid);
341: }
342: },
343:
344: canUnload: function(compMgr) {
345: dump("****** Unloading: Simple JS component! ****** \n");
346: return true;
347: }
348: }; // END Module
349:
350: function NSGetModule(compMgr, fileSpec) { return Module; }
351:
352: </xmp>
353: <br><br>
354: </li>
355:
356: <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>
357:
358: <li>On page 222: In Example 8-4 has been changed to:</li>
359: <li>On page 239: Example 8-15 has been changed to <br/></li>
360:
361: <xmp class="fixed">
362: DEPTH = ../../..
363: topsrcdir = ../../..
364: srcdir = .
365: VPATH = .
366:
367: include $(DEPTH)/config/autoconf.mk
368:
369: MODULE = xpcom
370: XPIDL_MODULE = simple
371: LIBRARY_NAME = simple
372: IS_COMPONENT = 1
373: MODULE_NAME = nsSimpleModule
374: REQUIRES = string \
375: xpcom \
376: $(NULL)
377:
378:
379: CPPSRCS = \
380: nsSimple.cpp \
381: nsSimpleModule.cpp \
382: $(NULL)
383:
384: XPIDLSRCS = nsISimple.idl
385:
386: include $(topsrcdir)/config/config.mk
387:
388: LIBS += \
389: $(XPCOM_LIBS) \
390: $(NSPR_LIBS) \
391: $(NULL)
392:
393: include $(topsrcdir)/config/rules.mk
394:
395: EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
396:
397: install:: $(TARGETS)
398: </xmp>
399:
400: </ul>
401:
402: <a name="ch9"></a>
403: <p><b>Chapter 9</b>
404:
405: <ul>
406:
407: <li>On page 257: In Example 9-7
408:
409: <xmp class="broken">
410: <triple subject="?listitem"
411: predicate=" http://xfly.mozdev.org/fly-rdf#location"
412: object="?location"/>
413: </xmp>
414:
415: has been changed to
416:
417: <xmp class="fixed">
418: <triple subject="?listitem"
419: predicate="fly-location#location"
420: object="?location"/>
421: </xmp>
422:
423: </ul>
424:
425: <a name="ch10"></a>
426: <p><b>Chapter 10</b>
427:
428: <ul>
429:
430: <li>On page 280: In Table 10-3 '<b class="broken">Mostly used for retrieving, datasources, resources, and literals.</b>' has been
431: changed to '<b class="fixed">Mostly used for retrieving datasources, resources, and literals.</b>'<br><br>
432:
433: <li>On page 297: '<b class="broken">http://www.jslib.mozdev.org</b>' has been changed to '<b
434: class="fixed">http://jslib.mozdev.org</b>'<br><br>
435:
436: </ul>
437:
438:
439: <a name="ch11"></a>
440: <p><b>Chapter 11</b>
441:
442: <ul>
443: <li>On page 314: In Example 11-5 and Example 11-6 '<b class="broken">var linetext =
444: document.createTextNode(messageParagraphs[i]);</b>' has been changed to '<b class="fixed">var linetext =
445: document.createTextNode(lines[i]);</b>'<br><br>
446: </ul>
447:
448:
449: <a name="ch12"></a>
450: <p><b>Chapter 12</b>
451:
452: <ul>
453:
454: <li>On page 336: In Example 12-6
455:
456: <xmp class="broken">
457: print ` <checkbox label="%s" />' % form['op1'].value
458: print ` <checkbox label="%s" />' % form['op2'].value
459: print ` <checkbox label="%s" />' % form['op3'].value
460: </xmp>
461:
462: has been changed to (note the difference in indentation and in using a single quote versus a backtick)
463:
464: <xmp class="fixed">
465: print ' <checkbox label="%s" />' % form['op1'].value
466: print ' <checkbox label="%s" />' % form['op2'].value
467: print ' <checkbox label="%s" />' % form['op3'].value
468: </xmp>
469:
470: <!--
471: <li>On page 339: A new 'Certificate Authorities and Digital
472: Signatures' section is being written with drafts available on <a
473: href="http://certs.mozdev.org">http://certs.mozdev.org</a><br><br>
474: </li>
475: -->
476:
477: </ul>
478:
479:
480: <a name="appa"></a>
481: <p><b>Appendix A</b>
482:
483: <ul>
484:
485: <li>On page 365: '<b class="broken">http://www.mozilla.org/source.tml</b>' has been changed to '<b
486: class="fixed">http://www.mozilla.org/source.html</b>'<br><br>
487:
488: </ul>
489:
490:
491: <a name="index"></a>
492: <p><b>Index</b>
493:
494: <ul>
495:
496: <li>On page 437: '<b class="broken">Chimera, 2</b>' has been changed to '<b class="fixed">Camino, 2</b>'<br><br>
497:
498: </ul>
499:
500:
501: <br><br>
502:
503: <!-- ?php require(NOTES); ? -->
504: <?php $post_to_list=NO; $author='reviewers@mozdev.org'; $target_page='corrections'; require(NOTES); ?>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>