The Component printBuffer should only be used by Component static functions
This commit is contained in:
parent
9f99649a87
commit
061c839a33
27 changed files with 344 additions and 265 deletions
|
|
@ -58,7 +58,7 @@ m.toString=function(){return this.name?this.name:this.id||this.type};
|
|||
m.sa=function(a,b,c){switch(b){case "clear":return this.J[b]||(this.J[b]=c,c.onclick=function(a){return function(){a.J.print&&(a.J.print.value="")}}(this)),!0;case "print":return this.J[b]||(this.J[b]=c,this.ja=function(a){this.u(a,this.type);return!0},c.value="",this.print=function(a){return function(b){rb(a,b)}}(c),this.u=function(a,b){return function(a,c){a||(a="");if(c!=Bb.Rb||"..."!=a.slice(-3))c&&(a=c+": "+a),rb(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}};m.log=function(){};m.print=function(){};m.u=function(){};m.status=function(a){this.u(this.type+": "+a)};m.ja=function(a,b,c){if(!b){var d=vb("Computer",this.id);if(d&&d.A.ub)return console.log("ignoring notice during unload: "+a),!1}c=c||this.type;b||r((c?c+": ":"")+a);return!0};function Cb(a,b){a.A.error=!0;a.ja(b)}
|
||||
function Db(a){return a.A.error?(a.u(a.toString()+" error"),!0):!1}function Eb(a,b){b&&(a.A.ready?b():a.cb=b);return a.A.ready}function Pb(a){if(!a.A.error&&(a.A.ready=!0,a.A.ready)){var b=a.cb;a.cb=null;b&&b()}}function Qb(a,b){a.A.Ua&&(b?a.A.ob=!0:void 0===b&&a.u(a.toString()+" busy"));return a.A.Ua}function Rb(a,b){if(a.A.ob)return a.A.Ua=!1,a.A.ob=!1;if(a.A.error)return a.u(a.toString()+" error"),!1;a.A.Ua=b;return a.A.Ua}m.Aa=function(){return this.A.ba=!0};
|
||||
m.ra=function(a,b){b&&(this.A.ba=!1);return!0};function Sb(a,b){if(a.D){a===a.D?b|=0:b=b||a.da;var c=a.D.da&b;return!!b&&c===b||!!(c&a.D.Eb)}return!1}function Tb(a,b,c,d){a.D&&(!0===c||Sb(a,c|0))&&a.D.message(b,d)}var Bb={cd:"notice",md:"warning",ERROR:"error",Rb:"progress"};window&&(window.PCjs||(window.PCjs={}),window.PCjs.Machines||(window.PCjs.Machines={}),window.PCjs.Components||(window.PCjs.Components=[]),window.PCjs.Commands||(window.PCjs.Commands={}));
|
||||
m.ra=function(a,b){b&&(this.A.ba=!1);return!0};function Sb(a,b){if(a.D){a===a.D?b|=0:b=b||a.da;var c=a.D.da&b;return!!b&&c===b||!!(c&a.D.Eb)}return!1}function Tb(a,b,c,d){a.D&&(!0===c||Sb(a,c|0))&&a.D.message(b,d)}var Bb={ERROR:"error",cd:"notice",Rb:"progress",SCRIPT:"script",md:"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 jb=window?window.PCjs.Machines:{},hb=window?window.PCjs.Components:[],xb=window?window.PCjs.Commands:{},yb=["hold","sleep","wait"],zb={alert:function(a){r(a);return!0},sleep:function(a,b){setTimeout(a,+b);return!1}},Ab={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});
|
||||
|
|
|
|||
Loading…
Reference in a new issue