The Component printBuffer should only be used by Component static functions

This commit is contained in:
Jeff Parsons 2017-06-29 08:38:02 -07:00 • committed by Jeff Parsons
commit 061c839a33
27 changed files with 344 additions and 265 deletions

View file

@ -67,7 +67,7 @@ h.toString=function(){return this.name?this.name:this.id||this.type};
h.wa=function(a,b,c){switch(b){case "clear":return this.H[b]||(this.H[b]=c,c.onclick=function(a){return function(){a.H.print&&(a.H.print.value="")}}(this)),!0;case "print":return this.H[b]||(this.H[b]=c,this.T=function(a){this.v(a,this.type);return!0},c.value="",this.print=function(a){return function(b){ib(a,b)}}(c),this.v=function(a,b){return function(a,c){a||(a="");if(c!=Cb.Ue||"..."!=a.slice(-3))c&&(a=c+": "+a),ib(b,a+"\n");else{c=b.value;var d=c.lastIndexOf(a);0>d?c+=a+"\n":c=c.substr(0,d)+(a+
".")+c.substr(d+a.length);8192<c.length&&(c=c.substr(c.length-4096));b.value=c;b.scrollTop=b.scrollHeight}}}(this,c)),!0;default:return!1}};h.log=function(){};h.print=function(){};h.v=function(){};h.status=function(a){this.v(this.type+": "+a)};h.T=function(a,b,c){if(!b){var d=qb("Computer",this.id);if(d&&d.A.Id)return console.log("ignoring notice during unload: "+a),!1}c=c||this.type;b||w((c?c+": ":"")+a);return!0};function Db(a,b){a.A.error=!0;a.T(b)}
function Eb(a){return a.A.error?(a.v(a.toString()+" error"),!0):!1}function Fb(a,b){b&&(a.A.ready?b():a.Mc=b);return a.A.ready}function D(a,b){a.A.error||(a.A.ready=!1!==b,a.A.ready&&(b=a.Mc,a.Mc=null,b&&b()))}function Gb(a,b){a.A.cb&&(b?a.A.wd=!0:void 0===b&&a.v(a.toString()+" busy"));return a.A.cb}function Hb(a,b){if(a.A.wd)return a.A.cb=!1,a.A.wd=!1;if(a.A.error)return a.v(a.toString()+" error"),!1;a.A.cb=b;return a.A.cb}h.Da=function(){return this.A.ca=!0};
h.Ca=function(a,b){b&&(this.A.ca=!1);return!0};function E(a,b){if(a.D){a===a.D?b|=0:b=b||a.ja;var c=a.D.ja&b;return!!b&&c===b||!!(c&a.D.ke)}return!1}function F(a,b,c,d){a.D&&(!0===c||E(a,c|0))&&a.D.message(b,d)}var Cb={Lj:"notice",mk:"warning",ERROR:"error",Ue:"progress"};window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]),window.PCjs.Commands||(window.PCjs.Commands={}));
h.Ca=function(a,b){b&&(this.A.ca=!1);return!0};function E(a,b){if(a.D){a===a.D?b|=0:b=b||a.ja;var c=a.D.ja&b;return!!b&&c===b||!!(c&a.D.ke)}return!1}function F(a,b,c,d){a.D&&(!0===c||E(a,c|0))&&a.D.message(b,d)}var Cb={ERROR:"error",Lj:"notice",Ue:"progress",SCRIPT:"script",mk:"warning"};window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]),window.PCjs.Commands||(window.PCjs.Commands={}));
var fb=window?window.PCjs.Machines:{},db=window?window.PCjs.Components:[],sb=window?window.PCjs.Commands:{},tb=["hold","sleep","wait"],ub={alert:function(a){w(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},vb={select:function(a,b,c){var d=!1;if(a=a.bindings[b])for(b=0;b<a.options.length;b++)if(a.options[b].textContent==c){a.selectedIndex!=b&&(a.selectedIndex=b);d=!0;break}return d}};
Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){b=b||0;for(var c=this.length;b<c;b++)if(this[b]===a)return b;return-1});Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});
Function.prototype.bind||(Function.prototype.bind=function(a){function b(){return e.apply(this instanceof c&&a?this:a,d.concat(Array.prototype.slice.call(arguments)))}function c(){}if("function"!=typeof this)throw new TypeError("Function.prototype.bind: non-callable object");var d=Array.prototype.slice.call(arguments,1),e=this;c.prototype=this.prototype;b.prototype=new c;return b});