diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-09-17 18:03:26 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-09-17 18:03:26 -0700 |
commit | cebb5fca612321f9436f324d6b95e94b0f1ac614 (patch) | |
tree | bc6c4f0e659990da24c019cdaefef4d9cb3ac2b1 /html/edit/010-sandbox-trace.mu.html | |
parent | 2d91279bacda12ea42608b4aa74f66589772fce9 (diff) | |
download | mu-cebb5fca612321f9436f324d6b95e94b0f1ac614.tar.gz |
3397
Diffstat (limited to 'html/edit/010-sandbox-trace.mu.html')
-rw-r--r-- | html/edit/010-sandbox-trace.mu.html | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/html/edit/010-sandbox-trace.mu.html b/html/edit/010-sandbox-trace.mu.html index 25c8ff32..5ab47bb0 100644 --- a/html/edit/010-sandbox-trace.mu.html +++ b/html/edit/010-sandbox-trace.mu.html @@ -48,8 +48,8 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color assume-console [ press F4 ] - <span class="Constant">3</span>:&:programming-environment-data<span class="Special"> <- </span>new-programming-environment screen:&:screen, <span class="Constant">1</span>:text, <span class="Constant">2</span>:text - event-loop screen:&:screen, console:&:console, <span class="Constant">3</span>:&:programming-environment-data + <span class="Constant">3</span>:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, <span class="Constant">1</span>:text, <span class="Constant">2</span>:text + event-loop screen:&:screen, console:&:console, <span class="Constant">3</span>:&:environment screen-should-contain [ <span class="Constant"> . run (F4) .</span> <span class="Constant"> . ┊ .</span> @@ -64,7 +64,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color left-click <span class="Constant">4</span>, <span class="Constant">51</span> ] run [ - event-loop screen:&:screen, console:&:console, <span class="Constant">3</span>:&:programming-environment-data + event-loop screen:&:screen, console:&:console, <span class="Constant">3</span>:&:environment <span class="Constant">4</span>:char/cursor-icon<span class="Special"> <- </span>copy <span class="Constant">9251/␣</span> print screen:&:screen, <span class="Constant">4</span>:char/cursor-icon ] @@ -90,7 +90,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color left-click <span class="Constant">4</span>, <span class="Constant">55</span> ] run [ - event-loop screen:&:screen, console:&:console, <span class="Constant">3</span>:&:programming-environment-data + event-loop screen:&:screen, console:&:console, <span class="Constant">3</span>:&:environment print screen:&:screen, <span class="Constant">4</span>:char/cursor-icon ] <span class="Comment"># trace hidden again</span> @@ -119,8 +119,8 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color assume-console [ press F4 ] - <span class="Constant">3</span>:&:programming-environment-data<span class="Special"> <- </span>new-programming-environment screen:&:screen, <span class="Constant">1</span>:text, <span class="Constant">2</span>:text - event-loop screen:&:screen, console:&:console, <span class="Constant">3</span>:&:programming-environment-data + <span class="Constant">3</span>:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, <span class="Constant">1</span>:text, <span class="Constant">2</span>:text + event-loop screen:&:screen, console:&:console, <span class="Constant">3</span>:&:environment screen-should-contain [ <span class="Constant"> . run (F4) .</span> <span class="Constant"> . ┊ .</span> @@ -136,7 +136,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color left-click <span class="Constant">4</span>, <span class="Constant">51</span> ] run [ - event-loop screen:&:screen, console:&:console, <span class="Constant">3</span>:&:programming-environment-data + event-loop screen:&:screen, console:&:console, <span class="Constant">3</span>:&:environment ] <span class="Comment"># trace now printed above result</span> screen-should-contain [ @@ -163,8 +163,8 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color press F4 left-click <span class="Constant">4</span>, <span class="Constant">51</span> ] - <span class="Constant">3</span>:&:programming-environment-data<span class="Special"> <- </span>new-programming-environment screen:&:screen, <span class="Constant">1</span>:text, <span class="Constant">2</span>:text - event-loop screen:&:screen, console:&:console, <span class="Constant">3</span>:&:programming-environment-data + <span class="Constant">3</span>:&:environment<span class="Special"> <- </span>new-programming-environment screen:&:screen, <span class="Constant">1</span>:text, <span class="Constant">2</span>:text + event-loop screen:&:screen, console:&:console, <span class="Constant">3</span>:&:environment screen-should-contain [ <span class="Constant"> . run (F4) .</span> <span class="Constant"> . ┊ .</span> @@ -178,7 +178,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color left-click <span class="Constant">5</span>, <span class="Constant">57</span> ] run [ - event-loop screen:&:screen, console:&:console, <span class="Constant">3</span>:&:programming-environment-data + event-loop screen:&:screen, console:&:console, <span class="Constant">3</span>:&:environment ] <span class="Comment"># no change; doesn't die</span> screen-should-contain [ @@ -191,13 +191,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color ] ] -<span class="muData">container</span> sandbox-data [ +<span class="muData">container</span> sandbox [ trace:text display-trace?:bool ] <span class="Comment"># replaced in a later layer</span> -<span class="muRecipe">def!</span> update-sandbox sandbox:&:sandbox-data, env:&:programming-environment-data, idx:num<span class="muRecipe"> -> </span>sandbox:&:sandbox-data, env:&:programming-environment-data [ +<span class="muRecipe">def!</span> update-sandbox sandbox:&:sandbox, env:&:environment, idx:num<span class="muRecipe"> -> </span>sandbox:&:sandbox, env:&:environment [ <span class="Constant">local-scope</span> <span class="Constant">load-ingredients</span> data:text<span class="Special"> <- </span>get *sandbox, <span class="Constant">data:offset</span> @@ -215,14 +215,14 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color click-column:num<span class="Special"> <- </span>get t, <span class="Constant">column:offset</span> on-sandbox-side?:bool<span class="Special"> <- </span>greater-or-equal click-column, sandbox-left-margin <span class="muControl">break-unless</span> on-sandbox-side? - first-sandbox:&:sandbox-data<span class="Special"> <- </span>get *env, <span class="Constant">sandbox:offset</span> + first-sandbox:&:sandbox<span class="Special"> <- </span>get *env, <span class="Constant">sandbox:offset</span> <span class="muControl">break-unless</span> first-sandbox first-sandbox-begins:num<span class="Special"> <- </span>get *first-sandbox, <span class="Constant">starting-row-on-screen:offset</span> click-row:num<span class="Special"> <- </span>get t, <span class="Constant">row:offset</span> below-sandbox-editor?:bool<span class="Special"> <- </span>greater-or-equal click-row, first-sandbox-begins <span class="muControl">break-unless</span> below-sandbox-editor? <span class="Comment"># identify the sandbox whose code is being clicked on</span> - sandbox:&:sandbox-data<span class="Special"> <- </span>find-click-in-sandbox-code env, click-row + sandbox:&:sandbox<span class="Special"> <- </span>find-click-in-sandbox-code env, click-row <span class="muControl">break-unless</span> sandbox <span class="Comment"># toggle its display-trace? property</span> x:bool<span class="Special"> <- </span>get *sandbox, <span class="Constant">display-trace?:offset</span> @@ -237,7 +237,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Delimiter">}</span> ] -<span class="muRecipe">def</span> find-click-in-sandbox-code env:&:programming-environment-data, click-row:num<span class="muRecipe"> -> </span>sandbox:&:sandbox-data [ +<span class="muRecipe">def</span> find-click-in-sandbox-code env:&:environment, click-row:num<span class="muRecipe"> -> </span>sandbox:&:sandbox [ <span class="Constant">local-scope</span> <span class="Constant">load-ingredients</span> <span class="Comment"># assert click-row >= sandbox.starting-row-on-screen</span> @@ -247,7 +247,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color assert clicked-on-sandboxes?, <span class="Constant">[extract-sandbox called on click to sandbox editor]</span> <span class="Comment"># while click-row < sandbox.next-sandbox.starting-row-on-screen</span> <span class="Delimiter">{</span> - next-sandbox:&:sandbox-data<span class="Special"> <- </span>get *sandbox, <span class="Constant">next-sandbox:offset</span> + next-sandbox:&:sandbox<span class="Special"> <- </span>get *sandbox, <span class="Constant">next-sandbox:offset</span> <span class="muControl">break-unless</span> next-sandbox next-start:num<span class="Special"> <- </span>get *next-sandbox, <span class="Constant">starting-row-on-screen:offset</span> found?:bool<span class="Special"> <- </span>lesser-than click-row, next-start |