Lively Kernel canvas
DraftCustomStyle40true
Xfalsenulltrue
Xfalsenulltrue
Xfalsenulltrue
restylefalsenulltruefalsetrue
MyTheme={styleName:'MyStyle'}MyTheme.parentStyleName='hpi'MyTheme.__proto__=DisplayThemes[MyTheme.parentStyleName]Object.extend(MyTheme,{slider:{borderOpacity:0,borderWidth:0,borderRadius:8,fill:Styles.linearGradient([[0,Color.black],[1,Color.green]])},menu_list:{fill:Color.black,},menu_items:{fontSize:20,textColor:Color.green,}})WorldMorph.current().setDisplayTheme(MyTheme)1419
false
TestCase.subclass("StyleSerializerTest",{serializeAndDeserialize:function(obj){varserializer=SmartRefSerializer.forLively();varserialized=serializer.serialize(obj);returnserializer.deserialize(serialized);},testSerializeColors:function(){varmyStyle={red_fill:{fill:Color.red}};varmyStyle2=this.serializeAndDeserialize(myStyle);this.assert(myStyle2.red_fill.fillinstanceofColor,"fillisnocolor");},testSerializeGradientFills:function(){varmyStyle={my_fill:{fill:Styles.linearGradient([[0,Color.black],[1,Color.white]])}};varmyStyle2=this.serializeAndDeserialize(myStyle);varfill2=myStyle2.my_fill.fill;//$morph('testRect').setFill(newlively.paint.LinearGradient(fill2.stops,fill2.vector))this.assert(fill2instanceofmyStyle.my_fill.fill.constructor,"fillclasschanged");this.assert(fill2.rawNode,"norawNode");},})1431
$morph('testScriptWindow').addScript(functiongetDoitContext(){varclassName='StyleSerializerTest';varclassObj=Global[className]if(!classObj)returnnull;if(!(this.exampleInstanceinstanceofclassObj)){this.exampleInstance=newclassObj()}returnthis.exampleInstance})14
13
aworkspacewhere"this"isboundtoaninstanceoftheeditedTestCase.Thisallowstointerativelyevaluatetestsstepbystepintheworkspace.171
TestCaseWorkspace20
InSmalltalkwewouldcallitprogramminginthedebugger....17
nullfalsetruenull
TestRunnerfalsenulltruefalse
Xfalsenulltrue
false
false
–falsenulltrue
false
falsenullfalse
SmartRefSerializerPluginTestfalsefalsetruefalsetrue0false
SmartRefSerializerTestfalsefalsetruefalsetrue0false
TabCompletionLayerTestfalsefalsetruefalsetrue0false
TabCompletionTestfalsefalsetruefalsetrue0false603.000015null
-1nullnulltruetruetrue
00.11
true
true
RunTestCasefalsenulltruefalsetrue
RunAllTestCasesfalsenulltruefalsetrue
Refreshfalsenulltruefalsetrue
null
null0
-----falsefalsetruefalsetrue0603.500005
-1nullnulltruetruetrue
00.11
true
true
truefalsenullnullnullnullfalse
ItseemsIneedhelpfromRoberthere:-wehavetofigureoutwhotodealwithrawNodesduringdeserialization....-IthinkJuliusdealtwithitbefore,hehadthesameproblemsinWebCards172
custom17
hpi17
lively17
primitive17
WorldMorph.current().displayTheme.styleNameWorldMorph.current().displayTheme.__proto__.styleNameserializer=SmartRefSerializer.forLively()serialized=serializer.serialize(MyTheme)result=serializer.deserialize(serialized)result.__proto__=DisplayThemes[result.parentStyleName]WorldMorph.current().setDisplayTheme(DisplayThemes.primitive)WorldMorph.current().setDisplayTheme(result)result.slider.fillinstanceoflively.paint.LinearGradientMyTheme.slider.fill.rawNoderesult.slider.fill.rawNode1414
nullfalsetruenull
Core.js:WorldMorph:Requirementsfalsenulltruefalse
Xfalsenulltrue
false
false
–falsenulltrue
false
falsenullfalse
http://lively-kernel.org/repository/webwerkstatt/truetruetruetruetrue
truetrue
00.11
true
true
codebasefalsenulltruefalsetrue
localfalsenulltruefalsetrue
Localcodefalsefalsetruefalsetrue0false208.000015null-1nullnulltruetruetrue
00.11
true
null
null
null
nulltrue
true
-----falsefalsetruefalsetrue0false208.000015null
-1nullnulltruetruetrue
00.11
true
null
null
null
nulltrue
true
-----falsefalsetruefalsetrue0false208.000015null
-1nullnulltruetruetrue
00.11
true
null
null
null
nulltrue
true
-----falsefalsetruefalsetrue0false208.000015null
-1nullnulltruetruetrue
00.11
true
null
null
null
nulltrue
true
20null
truetrue2000000
truetrue
00.11
true
true
20null
Addmodulefalsenulltruefalsetrue
Loadallfalsenulltruefalsetrue
LineNofalsenulltruefalsetrue
Refreshfalsenulltruefalsetrue
Evalonfalsenulltruefalsetrue
Sortfalsenulltruefalsetrue
Viewas...falsenulltruefalsetrue
truetrue
falsenullnullnullnullfalse
Wikicontroltruetrue
thisworkspaceisevaluatedafterworldloading
null91