<!-- saved from url=(0026)http://www.naturaldocs.org -->
<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxLog"></a>mxLog</h1><divclass=CBody><p>A singleton class that implements a simple console.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxLog">mxLog</a></td><tdclass=SDescription>A singleton class that implements a simple console.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxLog.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLog.consoleName"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">consoleName</a></td><tdclass=SDescription>Specifies the name of the console window. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxLog.TRACE"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">TRACE</a></td><tdclass=SDescription>Specified if the output for <ahref="#mxLog.enter"class=LFunctionid=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">enter</a> and <ahref="#mxLog.leave"class=LFunctionid=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">leave</a> should be visible in the console. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLog.DEBUG"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">DEBUG</a></td><tdclass=SDescription>Specifies if the output for <ahref="#mxLog.debug"class=LFunctionid=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">debug</a> should be visible in the console. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxLog.WARN"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">WARN</a></td><tdclass=SDescription>Specifies if the output for <ahref="#mxLog.warn"class=LFunctionid=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">warn</a> should be visible in the console. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLog.buffer"id=link9onMouseOver="ShowTip(event, 'tt9', 'link9')"onMouseOut="HideTip('tt9')">buffer</a></td><tdclass=SDescription>Buffer for pre-initialized content.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxLog.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLog.init"id=link10onMouseOver="ShowTip(event, 'tt10', 'link10')"onMouseOut="HideTip('tt10')">init</a></td><tdclass=SDescription>Initializes the DOM node for the console. </td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxLog.info"id=link11onMouseOver="ShowTip(event, 'tt11', 'link11')"onMouseOut="HideTip('tt11')">info</a></td><tdclass=SDescription>Writes the current navigator information to the console.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLog.addButton"id=link12onMouseOver="ShowTip(event, 'tt12', 'link12')"onMouseOut="HideTip('tt12')">addButton</a></td><tdclass=SDescription>Adds a button to the console using the given label and function.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxLog.isVisible"id=link13onMouseOver="ShowTip(event, 'tt13', 'link13')"onMouseOut="HideTip('tt13')">isVisible</a></td><tdclass=SDescription>Returns true if the console is visible.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxLog.show"id=link14onMouseOver="ShowTip(event, 'tt14', 'link14')"onMouseOut="HideTip('tt14')">show</a></td><tdclass=SDescription>Shows the console.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxLog.setVisible"id=link15onMouseOver="ShowTip(event, 'tt15', 'link15')"onMouseOut="HideTip('tt15')">setVisible</a></td><tdclass=SDescription>Shows or hides the console.</td></tr><trclass="SFunctio
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxLog.consoleName"></a>consoleName</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">consoleName: 'Console'</td></tr></table></blockquote><p>Specifies the name of the console window. Default is ‘Console’.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxLog.TRACE"></a>TRACE</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">TRACE: false</td></tr></table></blockquote><p>Specified if the output for <ahref="#mxLog.enter"class=LFunctionid=link26onMouseOver="ShowTip(event, 'tt3', 'link26')"onMouseOut="HideTip('tt3')">enter</a> and <ahref="#mxLog.leave"class=LFunctionid=link27onMouseOver="ShowTip(event, 'tt4', 'link27')"onMouseOut="HideTip('tt4')">leave</a> should be visible in the console. Default is false.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxLog.DEBUG"></a>DEBUG</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">DEBUG: true</td></tr></table></blockquote><p>Specifies if the output for <ahref="#mxLog.debug"class=LFunctionid=link28onMouseOver="ShowTip(event, 'tt6', 'link28')"onMouseOut="HideTip('tt6')">debug</a> should be visible in the console. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxLog.WARN"></a>WARN</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">WARN: true</td></tr></table></blockquote><p>Specifies if the output for <ahref="#mxLog.warn"class=LFunctionid=link29onMouseOver="ShowTip(event, 'tt8', 'link29')"onMouseOut="HideTip('tt8')">warn</a> should be visible in the console. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxLog.buffer"></a>buffer</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">buffer: ''</td></tr></table></blockquote><p>Buffer for pre-initialized content.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.init"></a>init</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">init: function()</td></tr></table></blockquote><p>Initializes the DOM node for the console. This requires document.body to point to a non-null value. This is called from within <ahref="#mxLog.setVisible"class=LFunctionid=link30onMouseOver="ShowTip(event, 'tt15', 'link30')"onMouseOut="HideTip('tt15')">setVisible</a> if the log has not yet been initialized.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.info"></a>info</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">info: function()</td></tr></table></blockquote><p>Writes the current navigator information to the console.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.addButton"></a>addButton</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>addButton: function(</td><tdclass="PParameter prettyprint "nowrap>lab,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>funct</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds a button to the console using the given label and function.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.isVisible"></a>isVisible</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">isVisible: function()</td></tr></table></blockquote><p>Returns true if the console is visible.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.show"></a>show</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">show: function()</td></tr></table></blockquote><p>Shows the console.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.setVisible"></a>setVisible</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>setVisible: function(</td><tdclass="PParameter prettyprint "nowrap>visible</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Shows or hides the console.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.enter"></a>enter</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>enter: function(</td><tdclass="PParameter prettyprint "nowrap>string</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Writes the specified string to the console if <ahref="#mxLog.TRACE"class=LVariableid=link31onMouseOver="ShowTip(event, 'tt2', 'link31')"onMouseOut="HideTip('tt2')">TRACE</a> is true and returns the current time in milliseconds.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">mxLog.show();
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.leave"></a>leave</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>leave: function(</td><tdclass="PParameter prettyprint "nowrap>string,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>t0</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Writes the specified string to the console if <ahref="#mxLog.TRACE"class=LVariableid=link32onMouseOver="ShowTip(event, 'tt2', 'link32')"onMouseOut="HideTip('tt2')">TRACE</a> is true and computes the difference between the current time and t0 in milliseconds. See <ahref="#mxLog.enter"class=LFunctionid=link33onMouseOver="ShowTip(event, 'tt3', 'link33')"onMouseOut="HideTip('tt3')">enter</a> for an example.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.debug"></a>debug</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">debug: function()</td></tr></table></blockquote><p>Adds all arguments to the console if <ahref="#mxLog.DEBUG"class=LVariableid=link34onMouseOver="ShowTip(event, 'tt5', 'link34')"onMouseOut="HideTip('tt5')">DEBUG</a> is enabled.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">mxLog.show();
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.warn"></a>warn</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">warn: function()</td></tr></table></blockquote><p>Adds all arguments to the console if <ahref="#mxLog.WARN"class=LVariableid=link35onMouseOver="ShowTip(event, 'tt7', 'link35')"onMouseOut="HideTip('tt7')">WARN</a> is enabled.</p><h4class=CHeading>Example</h4><blockquote><preclass="prettyprint">mxLog.show();
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.write"></a>write</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">write: function()</td></tr></table></blockquote><p>Adds the specified strings to the console.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxLog.writeln"></a>writeln</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">writeln: function()</td></tr></table></blockquote><p>Adds the specified strings to the console, appending a linefeed at the end of each string.</p></div></div></div>
</div><!--Content-->
<divid=Footer><ahref="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
<divclass=CToolTipid="tt1"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">consoleName: 'Console'</td></tr></table></blockquote>Specifies the name of the console window. </div></div><divclass=CToolTipid="tt2"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">TRACE: false</td></tr></table></blockquote>Specified if the output for enter and leave should be visible in the console. </div></div><divclass=CToolTipid="tt3"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>enter: function(</td><tdclass="PParameter prettyprint "nowrap>string</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Writes the specified string to the console if TRACE is true and returns the current time in milliseconds.</div></div><divclass=CToolTipid="tt4"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>leave: function(</td><tdclass="PParameter prettyprint "nowrap>string,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>t0</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Writes the specified string to the console if TRACE is true and computes the difference between the current time and t0 in milliseconds. </div></div><divclass=CToolTipid="tt5"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">DEBUG: true</td></tr></table></blockquote>Specifies if the output for debug should be visible in the console. </div></div><divclass=CToolTipid="tt6"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">debug: function()</td></tr></table></blockquote>Adds all arguments to the console if DEBUG is enabled.</div></div><divclass=CToolTipid="tt7"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">WARN: true</td></tr></table></blockquote>Specifies if the output for warn should be visible in the console. </div></div><divclass=CToolTipid="tt8"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">warn: function()</td></tr></table></blockquote>Adds all arguments to the console if WARN is enabled.</div></div><divclass=CToolTipid="tt9"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">buffer: ''</td></tr></table></blockquote>Buffer for pre-initialized content.</div></div><divclass=CToolTipid="tt10"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">init: function()</td></tr></table></blockquote>Initializes the DOM node for the console. </div></div><divclass=CToolTipid="tt11"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">info: function()</td></tr></table></blockquote>Writes the current navigator information to the console.</div></div><divclass=CToolTipid="tt12"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>addButton: function(</td><tdclass="PParameter prettyprint "nowrap>lab,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>funct</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Adds a button to the console using the given label and function.</div></div><divclass=