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")
Master'sTheses40
10000.15035434555622687Wikicontroltrue
Lincke2007.SophieScript161
Lincke2008.LivelyFabirk161
Engelhardt2008.Pitsupai161
C526
C526
C526
Object-specificScoping16
End-userProgrammingProgramming20
Object-specificScoping16
Collaboration20
Steinert2010.XPForums16
1
Dannert2009.WebCards16
1
null0.5816408693892035null
WebCardswithScritping161
Context-orientedProgramming20
actualcollaborativeprogramming/scriptingwasnotresearched101
null
10004.381097374889959Wikicontroltrue
//mergewithStyleClass??vartangerinColor=Color.rgb(255,131,19);varoceanColor=Color.rgb(28,107,160);styles={IdeaLevel1:{textColor:tangerinColor,fontSize:20}};MyGlobalStyleNames=styles;({a:2,b:4}).applyMyStyle=function(){varmorphs=WorldMorph.current().submorphs.select(function(ea){returnea.styleTags});morphs.each(function(ea){ea.styleTags.each(function(styleName){console.log("apply"+styleName+"("+styles[styleName]+")")ea.applyStyle(styles[styleName]);})})console.log("morphs"+morphs);}applyMyStyle()createLayer("StyleEditorLayer");enableLayer(StyleEditorLayer);layerClass(StyleEditorLayer,Morph,{addStyle:function(proceed,styleName){if(!this.styleTags){this.styleTags=[styleName];}elseif(this.styleTags.include(styleName)){return}else{this.styleTags.push(styleName);}},askAndAddNewStyle:function(proceed){varself=this;WorldMorph.current().prompt('addstylenamed',function(input){self.addStyle(input);})console.log("newstylee?")},syleSubMenu:function(proceed,evt){varmenu=[["addstyle",this,'askAndAddNewStyle']];varself=this;if(this.styleTags){this.styleTags.each(function(ea){menu.push(["[X]"+ea,this,function(){self.removeStyleNamed(ea)}])})}returnmenu;},morphMenu:function(proceed,evt){console.log("morphmenu:")varmenu=proceed(evt);if(menu){menu.addItem(["styles",this.syleSubMenu(evt)]);}returnmenu}})71truetruefalsetruetruefalse
false1truefalsetruetruefalse
nullfalsetruenullfalse
MySimpleStyleTagsfalsenullfalse
false
false
falsenullfalsefalsenullnullnullnullfalse
null45