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")
//DebuggingBehaviorcreateLayer("DebugMorphLayer");layerClass(DebugMorphLayer,TextMorph,{onKeyDown:function(proceed,evt){console.log("onKeyDown:"+evt)returnproceed(evt);}})Morph.prototype.getActivatedLayers=function(){varresult=[]if(this.layers){result=this.layers.concat(result);};if(this.owner&&this.owner.getActivatedLayers){result=result.concat(this.owner.getActivatedLayers());}returnresult}myContainer=WorldMorph.current().submorphs.detect(function(ea){returnea.name=="MyContainer"})myContainer.layers=[DebugMorphLayer]//myContainer.layers=[]1427
1.LayerComputation181
ThemorphactivatesDebugMorphLayerwhendebugThisMorphistrue14
10000.15095424847484662Wikicontroltrue
10000.34867887632603534Wikicontroltrue
10000.001996678111016037Wikicontroltrue
10000.8157794515678297Wikicontroltrue
firsttextmorphnull
true
-----falsetruefalse0
worldis1:WorldMorph([0,0,1289,866])falsetruefalse0
Errorevaluatinginitializer:SyntaxError:Invalidreturnstatement.falsetruefalse0
startingWikiNavigatorfalsetruefalse0
status207onPROPFINDhttp://lively-kernel.org/repository/webwerkstatt/ContextJSImplicitLayerExample.xhtmlfalsetruefalse0
http://lively-kernel.org/repository/webwerkstatt/anonymous_module_2loadedin59msfalsetruefalse0
http://lively-kernel.org/repository/webwerkstatt/anonymous_module_1loadedin308msfalsetruefalse0
fontHelvetica40:spacewidth11from51xWidth20falsetruefalse0
fontCourier14:spacewidth8from24xWidth8falsetruefalse0
fontCourier14:spacewidth8from24xWidth8falsetruefalse0
fontHelvetica18:spacewidth5from23xWidth9falsetruefalse0
fontHelvetica18:spacewidth5from23xWidth9falsetruefalse0
fontHelvetica14:spacewidth4from18xWidth7falsetruefalse0
fontHelvetica14:spacewidth4from18xWidth7falsetruefalse0
ResizingSVGcanvasfalsetruefalse0
Moduleloadcheckdone.25modulesloaded.falsetruefalse0
LayerDebugMorphLayerisalreadytherefalsetruefalse0
LayerDebugMorphLayerisalreadytherefalsetruefalse0
LayerDebugMorphLayerisalreadytherefalsetruefalse0
LayerDebugMorphLayerisalreadytherefalsetruefalse0
LayerDebugMorphLayerisalreadytherefalsetruefalse0
LayerDebugMorphLayerisalreadytherefalsetruefalse0
onKeyDown:#<Event:KeyDown32>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown32>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown8>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown8>"]]>falsetruefalse0
onKeyDown:#<Event:KeyDown8>"]]>falsetruefalse0
-------------------------------------------falsetruefalse0
invoke1:WorldMorph([0,0,1289,866])falsetruefalse0
status200onGEThttp://lively-kernel.org/repository/webwerkstatt/ContextJSImplicitLayerExample.xhtmlfalsetruefalse0
extendForSerializationundefinedfalsetruefalse0
ERRORSerializingiteminarraylayersof72139:Morph([0,0,460,187])falsetruefalse0821-1nulltrue0falsetruetruefalse
false1truefalse
nullfalse
nullfalse
nullfalse
nullfalsefalsetruetruefalse
true100false
truefalsenull050
nullfalsetruenullfalse
Consolefalsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
ImplicitObject-specificLayers40null43