Lively Kernel canvas
null
null
1000
2.6919597959942267
Wikicontrol
true
0
null
null
1000
0.13528189175969263
Wikicontrol
true
0
null
null
1000
1.6922796108322946
Wikicontrol
true
0
null
null
1000
0.06009150435506292
Wikicontrol
true
0
null
null
1000
0.5739627593642067
Wikicontrol
true
0
null
null
1000
2.12768750687352
Wikicontrol
true
0
null
null
1000
0.010859905203517959
Wikicontrol
true
0
null
null
1000
0.11143051549700675
Wikicontrol
true
0
null
null
1000
1.5529674606261052
Wikicontrol
true
null
null
1000
0.3486917074096547
Wikicontrol
true
null
null
1000
0.7457787010412045
Wikicontrol
true
null
null
1000
0.0024229495369508976
Wikicontrol
true
null
null
1000
0.7290021634584054
Wikicontrol
true
null
null
1000
1.642214100899319
Wikicontrol
true
null
null
1000
2.575854747631249e-7
Wikicontrol
true
null
null
1000
1.4699483088202387
Wikicontrol
true
null
null
Next
14
4
false
null
1
null
null
Prev
14
1
false
null
1
null
null
(12)ModifyingObjectsandJavaScriptCodeontheFly
18
53
false
null
1
null
0
null
null
Top
14
2
false
null
1
null
null
null
1000
0.0000036750734975601756
Wikicontrol
true
null
null
1000
0.44566006192940305
Wikicontrol
true
null
null
1000
1.5012393361216052
Wikicontrol
true
null
SincetheLivelyKernelisbuiltwithJavaScript,ahighlydynamicprogramminglanguagethatdoesnotrequireapplicationstobecompiledaheadoftime,virtuallyeveryobjectinthesystemcanbemodifiedatruntime.Onthistutorialpagewehaveincludedanumberoftextualscriptsthatyoucanexecuteandmodifyonthefly.Youcanexecutethescriptsusingthe"evaluateasJavaScriptcode"featurethatisavailableinthepopupmenuofTextMorphs.
14
5
368
false
null
455
null
null
null
1000
2.1063577114859373
Wikicontrol
true
null
null
1000
0.8223630904571004
Wikicontrol
true
null
null
1000
3.0903539669476046
Wikicontrol
true
null
P=newPen();P.setPenColor(Color.green);for(vari=1;i<=60;i++){P.go(2*i);P.turn(69);};P.drawLines();
5
97
true
null
96
null
null
P=newPen();P.setPenColor(Color.blue);for(vari=1;i<=60;i++){P.go(2*i);P.turn(79);};P.drawLines();
5
97
false
null
95
null
null
P=newPen();P.setPenColor(Color.black);for(vari=1;i<=60;i++){P.go(2*i);P.turn(89);};P.drawLines();
5
97
true
null
96
null
null
P=newPen();P.setPenColor(Color.red);for(vari=1;i<=60;i++){P.go(2*i);P.turn(59);};P.drawLines();
5
95
true
null
94
null
null
null
Tryityourself!TryevaluatingthescriptsthathavebeenprovidedinthefourTextMorphsbelow.Trymodifyingthescriptsyourselftogeneratedifferentkindsofgraphicalobjects.Notethattheobjectsgeneratedbythesescriptsarefull-fledgedgraphicalobjectsthatcanbeeditedusinghandles,menusandotherfeaturespresentedearlierinthistutorial.
0.8753891587257385
14
30
false
23
null
null
4
null
null
Notes:*ToopenthepopupmenuforTextMorphs,presstheAltkeywhileclickingtheborderareaoftheTextMorph(areasurroundingthetext).TextMorphscanbeeditedandevaluatedalsousingthefollowingkeyboardshortcuts.(NOTE:theseshortcutsdonotworkonallbrowsers.Insomebrowsersyoumayhavetousethe"AltGr"keyinstead):Alt-S("Save-It"):Save(accept)thechanges/evaluatetheentirecontentsasJavaScriptcodeAlt-D("Do-It"):EvaluatetheselectedtextasJavaScriptcodeAlt-P("Print-It"):EvaluatetheselectedtextasJavaScriptcodeandreplaceselectionwiththeresultAlt-I("Inspect-It"):OpeninspectorfortheobjectAlt-A:SelectAllAlt-X:CutAlt-C:CopyAlt-V:PasteAlt-Z:UndoSomeadditionalcommentsontextediting:Typingreplacesselection.Double-clickingselectsaword;triple-clickingselectstheentiretext.Double-clickingnearabracket,parenthesisoraJavaScriptcomment(/*...*/)selectstextinsidethebrackets/parentheses/comment.
13
927
false
null
146
null
null
1231420736044
111899
1
23
1231420736
null
null