[Jslib] Re: Problem with jslib install on Mac OS X
mark bokil
mbokil@bokil.com
Mon, 21 Apr 2003 22:59:57 -0400
>
> Thank you for your help
Also,
To help you debug your app as you work you can have messages sent to a
shell by using this function:
// dump send output to STDOUT terminal
function enableDump() {
const PREFS_CID = "@mozilla.org/preferences;1";
const PREFS_I_PREF = "nsIPref";
const PREF_STRING = "browser.dom.window.dump.enabled";
try {
var Pref = new Components.Constructor(PREFS_CID, PREFS_I_PREF);
var pref = new Pref();
pref.SetBoolPref(PREF_STRING, true);
} catch(e) {}
}
at the beginning of your javascript you can call enableDump(); to turn
on the shell dumping feature.
So in your app if you want to print a value of any variable just send it
to your terminal window by using dump("the value of the user was:
"+userID="\n");
-mark