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")
10000.025967529719253816Wikicontroltrue
10000.0000011284664997117495Wikicontroltrue
10004.230444989002116e-9Wikicontroltrue
10003.866584666882833e-8Wikicontroltrue
10000.000033276546576544215Wikicontroltrue
10001.1090390045734454e-7Wikicontroltrue
10000.002218720654917576Wikicontroltrue
10000.1986048135324984Wikicontroltrue
10001.452578224698361e-10Wikicontroltrue
10000.0008595062789034207Wikicontroltrue
DebugwithObject-specificLayers40
10000.0004583204458105217Wikicontroltrue
10002.8184741597483813e-8Wikicontroltrue
10000.13508519461656218Wikicontroltrue
10001.0754573878858857e-7Wikicontroltrue
10000.6624327936966473Wikicontroltrue
DebugArea18
firsttextdmorphnull1
10000.0423954821432106Wikicontroltrue
secondtextnull
10003.094052384561798Wikicontroltrue
-----falsetruefalse0false
onKeyDown:#<Event:KeyDown37>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown46>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown46>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown39>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown39>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown39>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown39>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown39>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown8>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown8>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown8>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown8>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown8>"]]>falsetruefalse0
morphmenu:falsetruefalse0
morphmenu:falsetruefalse0
-------------------------------------------falsetruefalse0
invoke60069:TextMorph([0,0,701,949.8666381835938])falsetruefalse0
computingwheelfor49falsetruefalse0
gotselectionsimplefalsetruefalse0
computingwheelfor49falsetruefalse0
computingwheelfor49falsetruefalse0
computingwheelfor49falsetruefalse0
fontCourier14:spacewidth8from24xWidth8falsetruefalse0
fontCourier14:spacewidth8from24xWidth8falsetruefalse0
morphmenu:falsetruefalse0
-------------------------------------------falsetruefalse0
invoke1:WorldMorph([0,0,1242,701])falsetruefalse0
status200onGEThttp://lively-kernel.org/repository/webwerkstatt/ContextJSDebugLayerExample.xhtml?1260808313991falsetruefalse0
extendForSerializationundefinedfalsetruefalse0800-1nulltrue0falsetruetruefalse
false1truefalse
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetruefalse
true100false
true050false
nullfalsetruenullfalse
Consolefalsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
Object.extend(Morph.prototype,LayerableObjectTrait);Morph.prototype.lookupLayersIn=["owner"];//DebuggingBehaviorcreateLayer("DebugMorphLayer");layerClass(DebugMorphLayer,TextMorph,{onKeyDown:function(proceed,evt){console.log("onKeyDown:"+evt)returnproceed(evt);},onMouseOver:function(proceed,evt){console.log("onKeyDown:"+evt)returnproceed(evt);}})//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);
nulltrue14truetruefalse4truetruetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
Workspacefalsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
null49