More diagnostic output improvements

This commit is contained in:
Jeff Parsons 2017-06-28 17:51:15 -07:00 committed by Jeff Parsons
commit 51f8440e9b
40 changed files with 4462 additions and 4398 deletions

View file

@ -973,9 +973,12 @@ class Component {
}(controlTextArea);
this.println = function(component, control) {
return function printlnControl(s, type, id) {
if (DEBUG || type != Component.TYPE.PROGRESS) {
s = (type != null? (type + ": ") : "") + (s || "");
component.print(s + '\n');
if (!s) s = "";
if (type != Component.TYPE.PROGRESS || s.slice(-3) != "...") {
if (type) s = type + ": " + s;
Component.appendControl(control, s + '\n');
} else {
Component.replaceControl(control, s, s + '.');
}
if (!COMPILED && window && window.console) Component.println(s, type, id);
};