Lively Kernel canvas
// this script is evaluated on world load
MyConsole = WorldMorph.current().submorphs.detect(function(ea){return ea.name == "MyConsole"});
if(!MyConsole) return;
MyConsole = MyConsole.component;
MyConsole.setText("-- start --");
MyConsole.log = function(s) {
this.setText(this.formalModel.getText() + "\n" + s);
};
MyConsole.log("My Console initialized!");
MyConsole.morph.resetScrollPane = function() {
var sp = this.enclosingScrollPane();
if (sp) sp.scrollToBottom();
};
// console.consumers seems to be broken... so we go the hard waz
console.log = console.log.wrap(function(proceed, s) {
MyConsole.log(s)
proceed(s)})
console.log("wrapped console for MyConsole successfully")
FixBoundEval40
require('cop.CopBenchmark').toRun(function(){Object.subclass('MyClass',{foo1:function(a){returna*a},foo2:function(a){returna*a},})createLayer("MyLayer");layerClass(MyLayer,MyClass,{foo2:function(proceed,a){returnproeed(a)*a}})enableLayer(MyLayer)CopBenchmark.result=""benchmakeBlock(benchmakeBlock("nothing",1,function(size,obj){for(vari=0;i<size;i++){}}))})1638
a=function(){})166
debugevalfalsetruefalse0
LayerMyLayerisalreadytherefalsetruefalse0
nothing5242880095551882.1052631579falsetruefalse0
statusmsg:TypeError:undefinedisnotafunctionLine:undefinedTypeError:undefinedisnotafunctionatCALL_NON_FUNCTION(native)atcop/CopBenchmark.js?1271772864326:38:3atevalatinteractiveEval(lively/Core.js:5799:2)atcurried(lively/miniprototype.js:103:23)atlively/Base.js:301:11atNamespace.runOnloadCallbacks(lively/Base.js:905:41)atNamespace.load(lively/Base.js:924:9)atObject.toRun(lively/Base.js:304:12)atTextMorph.<anonymous>(evalatinteractiveEval(lively/Core.js:5799:2))atTextMorph.interactiveEval(lively/Core.js:5799:9) (eval at interactiveEval (lively/Core.js:5799:2))\n at TextMorph.interactiveEval (lively/Core.js:5799:9)"]]>12falsetruefalse0
status:TypeError:undefinedisnotafunctionfalsetruefalse0
http://lively-kernel.org/repository/webwerkstatt/draft/../anonymous_module_8loadedin2023msfalsetruefalse0
LayerBugFixLayerisalreadytherefalsetruefalse0
debugevalfalsetruefalse0
LayerMyLayerisalreadytherefalsetruefalse0
nothing5242880092569878.2608695652falsetruefalse0
statusmsg:TypeError:undefinedisnotafunctionLine:undefinedTypeError:undefinedisnotafunctionatCALL_NON_FUNCTION(native)atcop/CopBenchmark.js?1271772864326:38:3atevalatinteractiveEval(lively/Core.js:5799:2)atcurried(lively/miniprototype.js:103:23)atlively/Base.js:301:11atNamespace.runOnloadCallbacks(lively/Base.js:905:41)atNamespace.load(lively/Base.js:924:9)atObject.toRun(lively/Base.js:304:12)atTextMorph.<anonymous>(evalatinteractiveEval(lively/Core.js:5799:2))atTextMorph.interactiveEval(lively/Core.js:5799:9) (eval at interactiveEval (lively/Core.js:5799:2))\n at TextMorph.interactiveEval (lively/Core.js:5799:9)"]]>12falsetruefalse0
status:TypeError:undefinedisnotafunctionfalsetruefalse0
http://lively-kernel.org/repository/webwerkstatt/draft/../anonymous_module_10loadedin124264msfalsetruefalse0
-------------------------------------------falsetruefalse0
invoke1:WorldMorph([[0,0,2289.5,1866.5]])falsetruefalse0
status200onGEThttp://lively-kernel.org/repository/webwerkstatt/draft/FixBoundEval.xhtmlfalsetruefalse0
problemstoparsehttp://lively-kernel.org/repository/webwerkstatt/draft/FixBoundEval.xhtmlfalsetruefalse0
extendForSerializationundefinedfalsetruefalse0
status204onPUThttp://lively-kernel.org/repository/webwerkstatt/draft/FixBoundEval.xhtmlfalsetruefalse0
successpublishingworldathttp://lively-kernel.org/repository/webwerkstatt/draft/FixBoundEval.xhtml,status204falsetruefalse0
statusmsg:worldsavedtoFixBoundEval.xhtmlin1566msfalsetruefalse0
wrappedonListUpdatefalsetruefalse0
gotselectionnullfalsetruefalse0
wrappedonListUpdatefalsetruefalse0
status207onPROPFINDhttp://lively-kernel.org/repository/webwerkstatt/draft/FixBoundEval.xhtmlfalsetruefalse0
status200onREPORThttp://lively-kernel.org/repository/webwerkstatt/draft/FixBoundEval.xhtmlfalsetruefalse0
Createdspec.url:http://lively-kernel.org/repository/webwerkstattdraft/FixBoundEval.xhtmlfalsetruefalse0
Createdspec.url:http://lively-kernel.org/repository/webwerkstattdraft/FixBoundEval.xhtmlfalsetruefalse0
Createdspec.url:http://lively-kernel.org/repository/webwerkstattdraft/FixBoundEval.xhtmlfalsetruefalse0
Createdspec.url:http://lively-kernel.org/repository/webwerkstattdraft/FixBoundEval.xhtmlfalsetruefalse0
Createdspec.url:http://lively-kernel.org/repository/webwerkstattdraft/FixBoundEval.xhtmlfalsetruefalse0
Createdspec.url:http://lively-kernel.org/repository/webwerkstattdraft/FixBoundEval.xhtmlfalsetruefalse0
Createdspec.url:http://lively-kernel.org/repository/webwerkstattdraft/FixBoundEval.xhtmlfalsetruefalse0
Createdspec.url:http://lively-kernel.org/repository/webwerkstattdraft/FixBoundEval.xhtmlfalsetruefalse0
Createdspec.url:http://lively-kernel.org/repository/webwerkstattdraft/FixBoundEval.xhtmlfalsetruefalse0
Createdspec.url:http://lively-kernel.org/repository/webwerkstattdraft/FixBoundEval.xhtmlfalsetruefalse0
Createdspec.url:http://lively-kernel.org/repository/webwerkstattdraft/FixBoundEval.xhtmlfalsetruefalse0
Createdspec.url:http://lively-kernel.org/repository/webwerkstattdraft/FixBoundEval.xhtmlfalsetruefalse0
wrappedonListUpdatefalsetruefalse0
status200onGEThttp://lively-kernel.org/repository/webwerkstatt/draft/FixBoundEval.xhtmlfalsetruefalse0
problemstoparsehttp://lively-kernel.org/repository/webwerkstatt/draft/FixBoundEval.xhtmlfalsetruefalse0
extendForSerializationundefinedfalsetruefalse0
Creatingifheader:(["7240//draft/FixBoundEval.xhtml"])falsetruefalse0
theresourcewaschangedelsewherePUThttp://lively-kernel.org/repository/webwerkstatt/draft/FixBoundEval.xhtml1falsetruefalse0
Failuresavingworldathttp://lively-kernel.org/repository/webwerkstatt/draft/FixBoundEval.xhtml.Status:412falsetruefalse0
fitWidthfailureonTextMorph.getCharBoundsfalsetruefalse0
fitWidthfailureonTextMorph.getCharBoundsfalsetruefalse0
status200onGEThttp://lively-kernel.org/repository/webwerkstatt/draft/FixBoundEval.xhtmlfalsetruefalse0
problemstoparsehttp://lively-kernel.org/repository/webwerkstatt/draft/FixBoundEval.xhtmlfalsetruefalse0
extendForSerializationundefinedfalsetruefalse0898.520009765625
- (eval at interactiveEval (lively/Core.js:5799:2))\n at TextMorph.interactiveEval (lively/Core.js:5799:9)"]]>
- (eval at interactiveEval (lively/Core.js:5799:2))\n at TextMorph.interactiveEval (lively/Core.js:5799:9)"]]>
-1nullnulltrue0falsetruetruefalse
false1truefalse
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetruefalse
truetrue100false
truefalsenull050
nullfalsetruenullfalse
Consolefalsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
createLayer('BugFixLayer')layerClass(BugFixLayer,TextMorph,{tryBoundEval:function(proceed,str,offset,printIt){console.log("debugeval")varresult;try{result=this.boundEval(str);if(printIt){this.setNullSelectionAt(this.selectionRange[1]+1);varprevSelection=this.selectionRange[0];varreplacement=""+resultthis.replaceSelectionWith(replacement);this.setSelectionRange(prevSelection,prevSelection+replacement.length);}}catch(e){offset=offset||0;varmsg=""+e+"\n"+"Line:"+e.line+"\n"+(e.sourceURL?("URL:"+(newURL(e.sourceURL).filename())+"\n"):"");if(e.stack){//makethestackfitintostatuswindowvarprefix=(newURL(Config.codeBase)).withRelativePartsResolved().toString()msg+=e.stack.replace(newRegExp(prefix,"g"),"");}this.world().setStatusMessage(msg,Color.red,5,function(){require('lively.Helper').toRun(function(){alert('Therwasanerrror\n'+printObject(e))})},{fontSize:12,fillOpacity:1})if(e.expressionEndOffset){//console.log("e.expressionBeginOffset"+e.expressionBeginOffset+"offset="+offset)this.setSelectionRange(e.expressionBeginOffset+offset,e.expressionEndOffset+offset);}elseif(e.line){varlineOffset=this.lineNumberForIndex(offset);//console.log("line:"+e.line+"offset:"+lineOffset)varline=this.lines[e.line+lineOffset-1]if(line&&line.startIndex){//console.log("setto"+line.startIndex)this.setSelectionRange(line.startIndex,line.getStopIndex());}}this.setStatusMessage(""+e,Color.red);}returnresult;},})WorldMorph.addMethods({setStatusMessage:function(msg,color,delay,callback,optStyle){console.log("statusmsg:"+msg)varstatusMorph=this._statusMorph||newTextMorph(pt(400,30).extentAsRectangle());statusMorph.applyStyle({borderWidth:0,fill:Color.gray,fontSize:16,fillOpacity:0.5});if(optStyle)statusMorph.applyStyle(optStyle);statusMorph.textString=msg;statusMorph.setTextColor(color||Color.black);if(callback){statusMorph.enableEvents();statusMorph.handlesMouseDown=Functions.True;varpressed=false;statusMorph.onMouseDown=function(){if(!pressed)callback();pressed=true;returntrue};statusMorph.onMouseMove=Functions.NULL;}else{statusMorph.ignoreEvents();}this.addMorph(statusMorph);statusMorph.align(statusMorph.bounds().topRight(),this.windowBounds().topRight());(functionremoveStatusMorph(){statusMorph.remove()}).delay(delay||4);},})36truetruefalsetruetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
falsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
null51