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")
f=function(){return[arguments[0],arguments[1]]}f(10,20)[1]f.call(10,20)f.apply(this,[10,20])f.call11
DebugwithObject-specificLayers40
96898:Morph([0,-0.0000011767580190280569,32,14.399999618530273])>>before96898:Morph([0,-0.0000011767580190280569,32,14.399999618530273])> before 96898:Morph([0,-0.0000011767580190280569,32,14.399999618530273])"]]>falsetruefalse0
96898:Morph([0,-0.0000011767580190280569,32,14.399999618530273])>>after96898:Morph([0,-0.0000011767580190280569,32,14.399999618530273])> after 96898:Morph([0,-0.0000011767580190280569,32,14.399999618530273])"]]>falsetruefalse0
layoutchangedin75694:TextMorph([0,-22.95833396911621,73.35467529296875,43.03841781616211])falsetruefalse0
96645:TextSelectionMorph([0,0,0,0])>>addMorphFrontOrBack96923:Morph([0,0.000033969121432164684,32,14.399999618530273])true>addMorphFrontOrBack 96923:Morph([0,0.000033969121432164684,32,14.399999618530273]) true"]]>falsetruefalse0
96923:Morph([0,0.000033969121432164684,32,14.399999618530273])>>before96923:Morph([0,0.000033969121432164684,32,14.399999618530273])> before 96923:Morph([0,0.000033969121432164684,32,14.399999618530273])"]]>falsetruefalse0
96923:Morph([0,0.000033969121432164684,32,14.399999618530273])>>after96923:Morph([0,0.000033969121432164684,32,14.399999618530273])> after 96923:Morph([0,0.000033969121432164684,32,14.399999618530273])"]]>falsetruefalse0
layoutchangedin75694:TextMorph([0,-24.0782527923584,73.91463470458984,42.47825241088867])falsetruefalse0
96645:TextSelectionMorph([0,0,0,0])>>addMorphFrontOrBack96948:Morph([0,-0.000047207642637658864,32,14.399999618530273])true>addMorphFrontOrBack 96948:Morph([0,-0.000047207642637658864,32,14.399999618530273]) true"]]>falsetruefalse0
96948:Morph([0,-0.000047207642637658864,32,14.399999618530273])>>before96948:Morph([0,-0.000047207642637658864,32,14.399999618530273])> before 96948:Morph([0,-0.000047207642637658864,32,14.399999618530273])"]]>falsetruefalse0
96948:Morph([0,-0.000047207642637658864,32,14.399999618530273])>>after96948:Morph([0,-0.000047207642637658864,32,14.399999618530273])> after 96948:Morph([0,-0.000047207642637658864,32,14.399999618530273])"]]>falsetruefalse0
layoutchangedin75694:TextMorph([0,-24.0782527923584,73.91463470458984,42.47825241088867])falsetruefalse0
96645:TextSelectionMorph([0,0,0,0])>>addMorphFrontOrBack96973:Morph([0,-0.000047207642637658864,32,14.399999618530273])true>addMorphFrontOrBack 96973:Morph([0,-0.000047207642637658864,32,14.399999618530273]) true"]]>falsetruefalse0
96973:Morph([0,-0.000047207642637658864,32,14.399999618530273])>>before96973:Morph([0,-0.000047207642637658864,32,14.399999618530273])> before 96973:Morph([0,-0.000047207642637658864,32,14.399999618530273])"]]>falsetruefalse0
96973:Morph([0,-0.000047207642637658864,32,14.399999618530273])>>after96973:Morph([0,-0.000047207642637658864,32,14.399999618530273])> after 96973:Morph([0,-0.000047207642637658864,32,14.399999618530273])"]]>falsetruefalse0
layoutchangedin75694:TextMorph([0,-24.0782527923584,74.47459411621094,42.47825241088867])falsetruefalse0
96645:TextSelectionMorph([0,0,0,0])>>addMorphFrontOrBack96998:Morph([0,-0.000047207642637658864,32,14.399999618530273])true>addMorphFrontOrBack 96998:Morph([0,-0.000047207642637658864,32,14.399999618530273]) true"]]>falsetruefalse0
96998:Morph([0,-0.000047207642637658864,32,14.399999618530273])>>before96998:Morph([0,-0.000047207642637658864,32,14.399999618530273])> before 96998:Morph([0,-0.000047207642637658864,32,14.399999618530273])"]]>falsetruefalse0
96998:Morph([0,-0.000047207642637658864,32,14.399999618530273])>>after96998:Morph([0,-0.000047207642637658864,32,14.399999618530273])> after 96998:Morph([0,-0.000047207642637658864,32,14.399999618530273])"]]>falsetruefalse0
layoutchangedin75694:TextMorph([0,-26.878049850463867,106.95223999023438,45.27804946899414])falsetruefalse0
96645:TextSelectionMorph([0,0,0,0])>>addMorphFrontOrBack97023:Morph([0,0.00004985046325600706,32,14.399999618530273])true>addMorphFrontOrBack 97023:Morph([0,0.00004985046325600706,32,14.399999618530273]) true"]]>falsetruefalse0
97023:Morph([0,0.00004985046325600706,32,14.399999618530273])>>before97023:Morph([0,0.00004985046325600706,32,14.399999618530273])> before 97023:Morph([0,0.00004985046325600706,32,14.399999618530273])"]]>falsetruefalse0
97023:Morph([0,0.00004985046325600706,32,14.399999618530273])>>after97023:Morph([0,0.00004985046325600706,32,14.399999618530273])> after 97023:Morph([0,0.00004985046325600706,32,14.399999618530273])"]]>falsetruefalse0
layoutchangedin75694:TextMorph([0,-25.198171615600586,104.71240234375,43.59817123413086])falsetruefalse0
96645:TextSelectionMorph([0,0,0,0])>>addMorphFrontOrBack97048:Morph([0,-0.00002838440013874788,32,14.399999618530273])true>addMorphFrontOrBack 97048:Morph([0,-0.00002838440013874788,32,14.399999618530273]) true"]]>falsetruefalse0
97048:Morph([0,-0.00002838440013874788,32,14.399999618530273])>>before97048:Morph([0,-0.00002838440013874788,32,14.399999618530273])> before 97048:Morph([0,-0.00002838440013874788,32,14.399999618530273])"]]>falsetruefalse0
97048:Morph([0,-0.00002838440013874788,32,14.399999618530273])>>after97048:Morph([0,-0.00002838440013874788,32,14.399999618530273])> after 97048:Morph([0,-0.00002838440013874788,32,14.399999618530273])"]]>falsetruefalse0
layoutchangedin75694:TextMorph([0,-25.198171615600586,104.71240234375,43.59817123413086])falsetruefalse0
96645:TextSelectionMorph([0,0,0,0])>>addMorphFrontOrBack97073:Morph([0,-0.00002838440013874788,32,14.399999618530273])true>addMorphFrontOrBack 97073:Morph([0,-0.00002838440013874788,32,14.399999618530273]) true"]]>falsetruefalse0
97073:Morph([0,-0.00002838440013874788,32,14.399999618530273])>>before97073:Morph([0,-0.00002838440013874788,32,14.399999618530273])> before 97073:Morph([0,-0.00002838440013874788,32,14.399999618530273])"]]>falsetruefalse0
97073:Morph([0,-0.00002838440013874788,32,14.399999618530273])>>after97073:Morph([0,-0.00002838440013874788,32,14.399999618530273])> after 97073:Morph([0,-0.00002838440013874788,32,14.399999618530273])"]]>falsetruefalse0
layoutchangedin75694:TextMorph([0,-20.158536911010742,95.1930923461914,38.558536529541016])falsetruefalse0
96645:TextSelectionMorph([0,0,0,0])>>addMorphFrontOrBack97098:Morph([0,0.00003691101665026508,32,14.399999618530273])true>addMorphFrontOrBack 97098:Morph([0,0.00003691101665026508,32,14.399999618530273]) true"]]>falsetruefalse0
97098:Morph([0,0.00003691101665026508,32,14.399999618530273])>>before97098:Morph([0,0.00003691101665026508,32,14.399999618530273])> before 97098:Morph([0,0.00003691101665026508,32,14.399999618530273])"]]>falsetruefalse0
97098:Morph([0,0.00003691101665026508,32,14.399999618530273])>>after97098:Morph([0,0.00003691101665026508,32,14.399999618530273])> after 97098:Morph([0,0.00003691101665026508,32,14.399999618530273])"]]>falsetruefalse0
layoutchangedin75694:TextMorph([0,-20.158536911010742,95.1930923461914,38.558536529541016])falsetruefalse0
96645:TextSelectionMorph([0,0,0,0])>>addMorphFrontOrBack97123:Morph([0,0.00003691101665026508,32,14.399999618530273])true>addMorphFrontOrBack 97123:Morph([0,0.00003691101665026508,32,14.399999618530273]) true"]]>falsetruefalse0
97123:Morph([0,0.00003691101665026508,32,14.399999618530273])>>before97123:Morph([0,0.00003691101665026508,32,14.399999618530273])> before 97123:Morph([0,0.00003691101665026508,32,14.399999618530273])"]]>falsetruefalse0
97123:Morph([0,0.00003691101665026508,32,14.399999618530273])>>after97123:Morph([0,0.00003691101665026508,32,14.399999618530273])> after 97123:Morph([0,0.00003691101665026508,32,14.399999618530273])"]]>falsetruefalse0
layoutchangedin75694:TextMorph([0,-20.158536911010742,95.1930923461914,38.558536529541016])falsetruefalse0
96645:TextSelectionMorph([0,0,0,0])>>addMorphFrontOrBack97148:Morph([0,0.00003691101665026508,32,14.399999618530273])true>addMorphFrontOrBack 97148:Morph([0,0.00003691101665026508,32,14.399999618530273]) true"]]>falsetruefalse0
97148:Morph([0,0.00003691101665026508,32,14.399999618530273])>>before97148:Morph([0,0.00003691101665026508,32,14.399999618530273])> before 97148:Morph([0,0.00003691101665026508,32,14.399999618530273])"]]>falsetruefalse0
97148:Morph([0,0.00003691101665026508,32,14.399999618530273])>>after97148:Morph([0,0.00003691101665026508,32,14.399999618530273])> after 97148:Morph([0,0.00003691101665026508,32,14.399999618530273])"]]>falsetruefalse0
morphmenu:falsetruefalse0
-------------------------------------------falsetruefalse0
invoke1:WorldMorph([0,0,1474,976])falsetruefalse0
fitWidthfailureonTextMorph.getCharBoundsfalsetruefalse0
fitWidthfailureonTextMorph.getCharBoundsfalsetruefalse0
status200onGEThttp://lively-kernel.org/repository/webwerkstatt/ContextJSDebugLayerExample.xhtml?1259657912529falsetruefalse0
extendForSerializationundefinedfalsetruefalse0layoutchangedin55225:TextMorph([0,0,167.42799377441406,21.200000762939453])834-1nulltrue0falsetruetruefalse
false1truefalse
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetruefalse
true100false
truefalsenull050
nullfalsetruenullfalse
Consolefalsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
firsttextmorphnull
secondtextmorph1null
1.LayerAssignment181
2.ImplicitLayerActivation18
DebugArea18
TheDebugMorphLayercanbeimplicitlyactiveinamorphhierrarchy.14
firsttextnull
Object.extend(Morph.prototype,LayerableObjectTrait);Morph.prototype.lookupLayersIn=["owner"];//DebuggingBehaviorcreateLayer("DebugMorphLayer");layerClass(DebugMorphLayer,TextMorph,{onKeyDown:function(proceed,evt){console.log("onKeyDown:"+evt)returnproceed(evt);},layoutChanged:function(proceed){console.log("layoutchangedin"+this);proceed();},//Howcanweobserve,thatwewentintoadebugcontext?//Howcanweobserve,thatweleftit?onDebugMorphLayerEnter:function(){console.log("enterdebuglayer"+this);},onDebugMorphLayerLeave:function(){console.log("leavedebuglayer"+this);},})layerClass(DebugMorphLayer,Morph,{addMorphFrontOrBack:function(proceed,m,isFront){console.log(""+this+">>addMorphFrontOrBack"+m+""+isFront)m.withAllSubmorphsDo(function(ea){console.log(m+">>before"+this);});varresult=proceed(m,isFront);m.withAllSubmorphsDo(function(ea){console.log(m+">>after"+this);});returnresult},});//StaticInstrumentationcreateLayer("DebugMorphMenuLayer");layerClass(DebugMorphMenuLayer,Morph,{toggleDebugging:function(){varlayers=this.getWithLayers();if(layers&&layers.include(DebugMorphLayer)){console.log("disabledebuggingfor"+this);this.setWithLayers([]);}else{console.log("enabledebuggingfor"+this);this.setWithLayers([DebugMorphLayer]);}},morphMenu:function(proceed,evt){console.log("morphmenu:")varmenu=proceed(evt);if(menu){menu.addItem([(this.getWithLayers().include(DebugMorphLayer)?"disable":"enable")+"debugging",this,'toggleDebugging']);}returnmenu}})enableLayer(DebugMorphMenuLayer);//disableLayer(DebugMorphMenuLayer);14>addMorphFrontOrBack \" + m + \" \" + isFront)\n\t\tm.withAllSubmorphsDo(function(ea){\r\t\t\tconsole.log(m + \" >> before \" + this );\r\t\t});\r\t\tvar result = proceed(m, isFront);\n\t\tm.withAllSubmorphsDo(function(ea){\n\t\t\tconsole.log(m + \" >> after \" + this );\n\t\t});\r\t\treturn result\r\t},\r});\r\r// Static Instrumentation\rcreateLayer(\"DebugMorphMenuLayer\");\rlayerClass(DebugMorphMenuLayer, Morph, {\r\r\ttoggleDebugging: function() {\r\t\tvar layers = this.getWithLayers();\r\t\tif (layers && layers.include(DebugMorphLayer)) {\r\t\t\tconsole.log(\"disable debugging for \" + this); \r\t\t\tthis.setWithLayers([]);\r\t\t} else {\r\t\t\tconsole.log(\"enable debugging for \" + this);\r\t\t\tthis.setWithLayers([DebugMorphLayer]);\r\t\t}\r\t},\r\r\tmorphMenu: function(proceed, evt) {\r\t\tconsole.log(\"morph menu : \")\r\t\tvar menu = proceed(evt);\r\t\tif (menu) {\r\t\t\tmenu.addItem([\r\t\t\t\t(this.getWithLayers().include(DebugMorphLayer) ?\r\t\t\t\t\t\"disable\" : \"enable\") + \" debugging\",\r\t\t\t\tthis, \r\t\t\t\t'toggleDebugging']);\r\t\t}\r\t\treturn menu\r\t}\r})\r\renableLayer(DebugMorphMenuLayer);\r// disableLayer(DebugMorphMenuLayer);\r"]]>truetruefalse11truetruetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
Workspacefalsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
null46