--- books/www/corrections.html 2002/12/14 14:28:30 1.59 +++ books/www/corrections.html 2002/12/17 13:13:58 1.63 @@ -87,12 +87,8 @@ id="printBtn" label="Print" oncommand="d
  • On page 120: 'dump(l+'\n');' has been changed to 'dump(len+'\n');'

  • -
  • 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 135: Example 5-11 needs to be: - +<li>On page 135: Example 5-11 has been changed to +<xmp class="fixed"> <html> <head> <title>Sound Service Play Example</title> @@ -101,18 +97,26 @@ id="printBtn" label="Print" oncommand="d netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); var sample = Components.classes["@mozilla.org/sound;1"].createInstance(); sample = sample.QueryInterface(Components.interfaces.nsISound); - sample.playSystemSound('resource:/res/samples/test.wav'); + 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> <body> <form name="form"> <input type="button" value="Play Sound" onclick="play();"> - </form> + </form> </body> </html> -

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