LWWidget.Debug = Base.Comp.inherits({ constructor: function () { this.base(); this.addSlot('drawLog'); this.timer = new Base.Timer(1000, true); this.timer.bindEvent('Tick', 'drawLog', this); }, show: function () { document.getElementById('debugLink').style.display = 'none'; document.getElementById('mainDiv').style.display = 'none'; this.lastLength = -1; this.draw(); document.getElementById('debugDiv').style.display = 'block'; this.timer.start(); }, hide: function () { this.timer.stop(); document.getElementById('debugDiv').style.display = 'none'; document.getElementById('debugLink').style.display = 'block'; document.getElementById('mainDiv').style.display = 'block'; }, draw: function () { var _str = '
Debug mode | ' + 'Flush log - Hide |
The log is empty
'; } else { _s = '';
for (var i=_l.length;i>0;i--) {
_s += '[' + i + '] ' + _l[i-1] + '
';
}
_s += '