diff options
Diffstat (limited to 'html/edit/008-sandbox-edit.mu.html')
-rw-r--r-- | html/edit/008-sandbox-edit.mu.html | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/html/edit/008-sandbox-edit.mu.html b/html/edit/008-sandbox-edit.mu.html index 1085b8ab..4f4281a1 100644 --- a/html/edit/008-sandbox-edit.mu.html +++ b/html/edit/008-sandbox-edit.mu.html @@ -65,12 +65,12 @@ if ('onhashchange' in window) { <span id="L7" class="LineNr"> 7 </span> <span class="Comment"># empty recipes</span> <span id="L8" class="LineNr"> 8 </span> assume-resources [ <span id="L9" class="LineNr"> 9 </span> ] -<span id="L10" class="LineNr"> 10 </span> env:&:environment <span class="Special"><-</span> new-programming-environment <a href='088file.mu.html#L11'>resources</a>, <a href='081print.mu.html#L4'>screen</a>, <span class="Constant">[add 2, 2]</span> +<span id="L10" class="LineNr"> 10 </span> env:&:environment <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L21'>new-programming-environment</a> <a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L4'>screen</a>, <span class="Constant">[add 2, 2]</span> <span id="L11" class="LineNr"> 11 </span> <span class="Comment"># run it</span> <span id="L12" class="LineNr"> 12 </span> assume-console [ <span id="L13" class="LineNr"> 13 </span> press F4 <span id="L14" class="LineNr"> 14 </span> ] -<span id="L15" class="LineNr"> 15 </span> event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, env, <a href='088file.mu.html#L11'>resources</a> +<span id="L15" class="LineNr"> 15 </span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L16" class="LineNr"> 16 </span> screen-should-contain [ <span id="L17" class="LineNr"> 17 </span> <span class="Constant"> . run (F4) .</span> <span id="L18" class="LineNr"> 18 </span> <span class="Constant"> . ╎ .</span> @@ -86,7 +86,7 @@ if ('onhashchange' in window) { <span id="L28" class="LineNr"> 28 </span> left-click<span class="Constant"> 3</span>,<span class="Constant"> 55</span> <span id="L29" class="LineNr"> 29 </span> ] <span id="L30" class="LineNr"> 30 </span> run [ -<span id="L31" class="LineNr"> 31 </span> event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, env, <a href='088file.mu.html#L11'>resources</a> +<span id="L31" class="LineNr"> 31 </span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L32" class="LineNr"> 32 </span> ] <span id="L33" class="LineNr"> 33 </span> <span class="Comment"># it pops back into editor</span> <span id="L34" class="LineNr"> 34 </span> screen-should-contain [ @@ -100,7 +100,7 @@ if ('onhashchange' in window) { <span id="L42" class="LineNr"> 42 </span> type <span class="Constant">[0]</span> <span id="L43" class="LineNr"> 43 </span> ] <span id="L44" class="LineNr"> 44 </span> run [ -<span id="L45" class="LineNr"> 45 </span> event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, env, <a href='088file.mu.html#L11'>resources</a> +<span id="L45" class="LineNr"> 45 </span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L46" class="LineNr"> 46 </span> ] <span id="L47" class="LineNr"> 47 </span> screen-should-contain [ <span id="L48" class="LineNr"> 48 </span> <span class="Constant"> . run (F4) .</span> @@ -117,12 +117,12 @@ if ('onhashchange' in window) { <span id="L59" class="LineNr"> 59 </span> <span class="Comment"># empty recipes</span> <span id="L60" class="LineNr"> 60 </span> assume-resources [ <span id="L61" class="LineNr"> 61 </span> ] -<span id="L62" class="LineNr"> 62 </span> env:&:environment <span class="Special"><-</span> new-programming-environment <a href='088file.mu.html#L11'>resources</a>, <a href='081print.mu.html#L4'>screen</a>, <span class="Constant">[add 2, 2]</span> +<span id="L62" class="LineNr"> 62 </span> env:&:environment <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L21'>new-programming-environment</a> <a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L4'>screen</a>, <span class="Constant">[add 2, 2]</span> <span id="L63" class="LineNr"> 63 </span> <span class="Comment"># run it</span> <span id="L64" class="LineNr"> 64 </span> assume-console [ <span id="L65" class="LineNr"> 65 </span> press F4 <span id="L66" class="LineNr"> 66 </span> ] -<span id="L67" class="LineNr"> 67 </span> event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, env, <a href='088file.mu.html#L11'>resources</a> +<span id="L67" class="LineNr"> 67 </span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L68" class="LineNr"> 68 </span> screen-should-contain [ <span id="L69" class="LineNr"> 69 </span> <span class="Constant"> . run (F4) .</span> <span id="L70" class="LineNr"> 70 </span> <span class="Constant"> . ╎ .</span> @@ -138,7 +138,7 @@ if ('onhashchange' in window) { <span id="L80" class="LineNr"> 80 </span> left-click<span class="Constant"> 3</span>,<span class="Constant"> 68</span> <span id="L81" class="LineNr"> 81 </span> ] <span id="L82" class="LineNr"> 82 </span> run [ -<span id="L83" class="LineNr"> 83 </span> event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, env, <a href='088file.mu.html#L11'>resources</a> +<span id="L83" class="LineNr"> 83 </span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L84" class="LineNr"> 84 </span> ] <span id="L85" class="LineNr"> 85 </span> <span class="Comment"># it pops back into editor</span> <span id="L86" class="LineNr"> 86 </span> screen-should-contain [ @@ -152,7 +152,7 @@ if ('onhashchange' in window) { <span id="L94" class="LineNr"> 94 </span> type <span class="Constant">[0]</span> <span id="L95" class="LineNr"> 95 </span> ] <span id="L96" class="LineNr"> 96 </span> run [ -<span id="L97" class="LineNr"> 97 </span> event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, env, <a href='088file.mu.html#L11'>resources</a> +<span id="L97" class="LineNr"> 97 </span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L98" class="LineNr"> 98 </span> ] <span id="L99" class="LineNr"> 99 </span> screen-should-contain [ <span id="L100" class="LineNr">100 </span> <span class="Constant"> . run (F4) .</span> @@ -165,50 +165,50 @@ if ('onhashchange' in window) { <span id="L107" class="LineNr">107 </span><span class="muRecipe">after</span> <span class="Constant"><global-touch></span> [ <span id="L108" class="LineNr">108 </span> <span class="Comment"># support 'edit' button</span> <span id="L109" class="LineNr">109 </span> <span class="Delimiter">{</span> -<span id="L110" class="LineNr">110 </span> edit?:bool <span class="Special"><-</span> should-attempt-edit? click-row, click-column, env +<span id="L110" class="LineNr">110 </span> edit?:bool <span class="Special"><-</span> <a href='008-sandbox-edit.mu.html#L123'>should-attempt-edit?</a> click-row, click-column, env <span id="L111" class="LineNr">111 </span> <span class="muControl">break-unless</span> edit? -<span id="L112" class="LineNr">112 </span> edit?, env <span class="Special"><-</span> try-edit-sandbox click-row, env +<span id="L112" class="LineNr">112 </span> edit?, env <span class="Special"><-</span> <a href='008-sandbox-edit.mu.html#L142'>try-edit-sandbox</a> click-row, env <span id="L113" class="LineNr">113 </span> <span class="muControl">break-unless</span> edit? -<span id="L114" class="LineNr">114 </span> <a href='081print.mu.html#L623'>hide-screen</a> <a href='081print.mu.html#L4'>screen</a> -<span id="L115" class="LineNr">115 </span> <a href='081print.mu.html#L4'>screen</a> <span class="Special"><-</span> render-sandbox-side <a href='081print.mu.html#L4'>screen</a>, env, render -<span id="L116" class="LineNr">116 </span> <a href='081print.mu.html#L4'>screen</a> <span class="Special"><-</span> update-cursor <a href='081print.mu.html#L4'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env -<span id="L117" class="LineNr">117 </span> <a href='081print.mu.html#L631'>show-screen</a> <a href='081print.mu.html#L4'>screen</a> +<span id="L114" class="LineNr">114 </span> <a href='../081print.mu.html#L623'>hide-screen</a> <a href='../081print.mu.html#L4'>screen</a> +<span id="L115" class="LineNr">115 </span> <a href='../081print.mu.html#L4'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L496'>render-sandbox-side</a> <a href='../081print.mu.html#L4'>screen</a>, env, <a href='001-editor.mu.html#L122'>render</a> +<span id="L116" class="LineNr">116 </span> <a href='../081print.mu.html#L4'>screen</a> <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L511'>update-cursor</a> <a href='../081print.mu.html#L4'>screen</a>, recipes, current-sandbox, sandbox-in-focus?, env +<span id="L117" class="LineNr">117 </span> <a href='../081print.mu.html#L631'>show-screen</a> <a href='../081print.mu.html#L4'>screen</a> <span id="L118" class="LineNr">118 </span> <span class="muControl">loop</span> <span class="Constant">+next-event</span> <span id="L119" class="LineNr">119 </span> <span class="Delimiter">}</span> <span id="L120" class="LineNr">120 </span>] <span id="L121" class="LineNr">121 </span> <span id="L122" class="LineNr">122 </span><span class="Comment"># some preconditions for attempting to edit a sandbox</span> -<span id="L123" class="LineNr">123 </span><span class="muRecipe">def</span> should-attempt-edit? click-row:num, click-column:num, env:&:environment<span class="muRecipe"> -> </span>result:bool [ +<span id="L123" class="LineNr">123 </span><span class="muRecipe">def</span> <a href='008-sandbox-edit.mu.html#L123'>should-attempt-edit?</a> click-row:num, click-column:num, env:&:environment<span class="muRecipe"> -> </span>result:bool [ <span id="L124" class="LineNr">124 </span> <span class="Constant">local-scope</span> <span id="L125" class="LineNr">125 </span> <span class="Constant">load-ingredients</span> <span id="L126" class="LineNr">126 </span> <span class="Comment"># are we below the sandbox editor?</span> -<span id="L127" class="LineNr">127 </span> click-sandbox-area?:bool <span class="Special"><-</span> click-on-sandbox-area? click-row, click-column, env +<span id="L127" class="LineNr">127 </span> click-sandbox-area?:bool <span class="Special"><-</span> <a href='006-sandbox-copy.mu.html#L190'>click-on-sandbox-area?</a> click-row, click-column, env <span id="L128" class="LineNr">128 </span> <span class="muControl">return-unless</span> click-sandbox-area?, <span class="Constant">0/false</span> <span id="L129" class="LineNr">129 </span> <span class="Comment"># narrower, is the click in the columns spanning the 'edit' button?</span> <span id="L130" class="LineNr">130 </span> first-sandbox:&:editor <span class="Special"><-</span> get *env, <span class="Constant">current-sandbox:offset</span> <span id="L131" class="LineNr">131 </span> assert first-sandbox, <span class="Constant">[!!]</span> <span id="L132" class="LineNr">132 </span> sandbox-left-margin:num <span class="Special"><-</span> get *first-sandbox, <span class="Constant">left:offset</span> <span id="L133" class="LineNr">133 </span> sandbox-right-margin:num <span class="Special"><-</span> get *first-sandbox, <span class="Constant">right:offset</span> -<span id="L134" class="LineNr">134 </span> edit-button-left:num, edit-button-right:num, _ <span class="Special"><-</span> sandbox-menu-columns sandbox-left-margin, sandbox-right-margin -<span id="L135" class="LineNr">135 </span> edit-button-vertical-area?:bool <span class="Special"><-</span> within-range? click-column, edit-button-left, edit-button-right +<span id="L134" class="LineNr">134 </span> edit-button-left:num, edit-button-right:num, _ <span class="Special"><-</span> <a href='005-sandbox.mu.html#L339'>sandbox-menu-columns</a> sandbox-left-margin, sandbox-right-margin +<span id="L135" class="LineNr">135 </span> edit-button-vertical-area?:bool <span class="Special"><-</span> <a href='006-sandbox-copy.mu.html#L211'>within-range?</a> click-column, edit-button-left, edit-button-right <span id="L136" class="LineNr">136 </span> <span class="muControl">return-unless</span> edit-button-vertical-area?, <span class="Constant">0/false</span> <span id="L137" class="LineNr">137 </span> <span class="Comment"># finally, is sandbox editor empty?</span> <span id="L138" class="LineNr">138 </span> current-sandbox:&:editor <span class="Special"><-</span> get *env, <span class="Constant">current-sandbox:offset</span> -<span id="L139" class="LineNr">139 </span> result <span class="Special"><-</span> empty-editor? current-sandbox +<span id="L139" class="LineNr">139 </span> result <span class="Special"><-</span> <a href='006-sandbox-copy.mu.html#L203'>empty-editor?</a> current-sandbox <span id="L140" class="LineNr">140 </span>] <span id="L141" class="LineNr">141 </span> -<span id="L142" class="LineNr">142 </span><span class="muRecipe">def</span> try-edit-sandbox click-row:num, env:&:environment<span class="muRecipe"> -> </span>clicked-on-edit-button?:bool, env:&:environment [ +<span id="L142" class="LineNr">142 </span><span class="muRecipe">def</span> <a href='008-sandbox-edit.mu.html#L142'>try-edit-sandbox</a> click-row:num, env:&:environment<span class="muRecipe"> -> </span>clicked-on-edit-button?:bool, env:&:environment [ <span id="L143" class="LineNr">143 </span> <span class="Constant">local-scope</span> <span id="L144" class="LineNr">144 </span> <span class="Constant">load-ingredients</span> <span id="L145" class="LineNr">145 </span> <span class="Comment"># identify the sandbox to edit, if the click was actually on the 'edit' button</span> -<span id="L146" class="LineNr">146 </span> sandbox:&:sandbox <span class="Special"><-</span> find-sandbox env, click-row +<span id="L146" class="LineNr">146 </span> sandbox:&:sandbox <span class="Special"><-</span> <a href='006-sandbox-copy.mu.html#L175'>find-sandbox</a> env, click-row <span id="L147" class="LineNr">147 </span> <span class="muControl">return-unless</span> sandbox, <span class="Constant">0/false</span> <span id="L148" class="LineNr">148 </span> clicked-on-edit-button? <span class="Special"><-</span> copy <span class="Constant">1/true</span> <span id="L149" class="LineNr">149 </span> <span class="Comment"># 'edit' button = 'copy' button + 'delete' button</span> <span id="L150" class="LineNr">150 </span> text:text <span class="Special"><-</span> get *sandbox, <span class="Constant">data:offset</span> <span id="L151" class="LineNr">151 </span> current-sandbox:&:editor <span class="Special"><-</span> get *env, <span class="Constant">current-sandbox:offset</span> -<span id="L152" class="LineNr">152 </span> current-sandbox <span class="Special"><-</span> insert-text current-sandbox, text -<span id="L153" class="LineNr">153 </span> env <span class="Special"><-</span> delete-sandbox env, sandbox +<span id="L152" class="LineNr">152 </span> current-sandbox <span class="Special"><-</span> <a href='001-editor.mu.html#L72'>insert-text</a> current-sandbox, text +<span id="L153" class="LineNr">153 </span> env <span class="Special"><-</span> <a href='007-sandbox-delete.mu.html#L109'>delete-sandbox</a> env, sandbox <span id="L154" class="LineNr">154 </span> <span class="Comment"># reset scroll</span> <span id="L155" class="LineNr">155 </span> *env <span class="Special"><-</span> put *env, <span class="Constant">render-from:offset</span>,<span class="Constant"> -1</span> <span id="L156" class="LineNr">156 </span> <span class="Comment"># position cursor in sandbox editor</span> @@ -223,18 +223,18 @@ if ('onhashchange' in window) { <span id="L165" class="LineNr">165 </span> assume-resources [ <span id="L166" class="LineNr">166 </span> ] <span id="L167" class="LineNr">167 </span> <span class="Comment"># right editor contains a print instruction</span> -<span id="L168" class="LineNr">168 </span> env:&:environment <span class="Special"><-</span> new-programming-environment <a href='088file.mu.html#L11'>resources</a>, <a href='081print.mu.html#L4'>screen</a>, <span class="Constant">[print-integer <a href='081print.mu.html#L4'>screen</a>, 4]</span> +<span id="L168" class="LineNr">168 </span> env:&:environment <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L21'>new-programming-environment</a> <a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L4'>screen</a>, <span class="Constant">[print-integer <a href='../081print.mu.html#L4'>screen</a>, 4]</span> <span id="L169" class="LineNr">169 </span> <span class="Comment"># run the sandbox</span> <span id="L170" class="LineNr">170 </span> assume-console [ <span id="L171" class="LineNr">171 </span> press F4 <span id="L172" class="LineNr">172 </span> ] -<span id="L173" class="LineNr">173 </span> event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, env, <a href='088file.mu.html#L11'>resources</a> +<span id="L173" class="LineNr">173 </span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L174" class="LineNr">174 </span> screen-should-contain [ <span id="L175" class="LineNr">175 </span> <span class="Constant"> . run (F4) .</span> <span id="L176" class="LineNr">176 </span> <span class="Constant"> . ╎ .</span> <span id="L177" class="LineNr">177 </span><span class="Constant"> .╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╎─────────────────────────────────────────────────.</span> <span id="L178" class="LineNr">178 </span> <span class="Constant"> . ╎0 edit copy delete .</span> -<span id="L179" class="LineNr">179 </span> <span class="Constant"> . ╎print-integer <a href='081print.mu.html#L4'>screen</a>, 4 .</span> +<span id="L179" class="LineNr">179 </span> <span class="Constant"> . ╎print-integer <a href='../081print.mu.html#L4'>screen</a>, 4 .</span> <span id="L180" class="LineNr">180 </span> <span class="Constant"> . ╎screen: .</span> <span id="L181" class="LineNr">181 </span> <span class="Constant"> . ╎ .4 . .</span> <span id="L182" class="LineNr">182 </span> <span class="Constant"> . ╎ . . .</span> @@ -249,11 +249,11 @@ if ('onhashchange' in window) { <span id="L191" class="LineNr">191 </span> left-click<span class="Constant"> 3</span>,<span class="Constant"> 65</span> <span id="L192" class="LineNr">192 </span> ] <span id="L193" class="LineNr">193 </span> run [ -<span id="L194" class="LineNr">194 </span> event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, env, <a href='088file.mu.html#L11'>resources</a> +<span id="L194" class="LineNr">194 </span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L195" class="LineNr">195 </span> ] <span id="L196" class="LineNr">196 </span> screen-should-contain [ <span id="L197" class="LineNr">197 </span> <span class="Constant"> . run (F4) .</span> -<span id="L198" class="LineNr">198 </span> <span class="Constant"> . ╎print-integer <a href='081print.mu.html#L4'>screen</a>, 4 .</span> +<span id="L198" class="LineNr">198 </span> <span class="Constant"> . ╎print-integer <a href='../081print.mu.html#L4'>screen</a>, 4 .</span> <span id="L199" class="LineNr">199 </span><span class="Constant"> .╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╎─────────────────────────────────────────────────.</span> <span id="L200" class="LineNr">200 </span> <span class="Constant"> . ╎ .</span> <span id="L201" class="LineNr">201 </span> <span class="Constant"> . ╎ .</span> @@ -267,8 +267,8 @@ if ('onhashchange' in window) { <span id="L209" class="LineNr">209 </span> <span class="Comment"># initialize environment</span> <span id="L210" class="LineNr">210 </span> assume-resources [ <span id="L211" class="LineNr">211 </span> ] -<span id="L212" class="LineNr">212 </span> env:&:environment <span class="Special"><-</span> new-programming-environment <a href='088file.mu.html#L11'>resources</a>, <a href='081print.mu.html#L4'>screen</a>, <span class="Constant">[]</span> -<span id="L213" class="LineNr">213 </span> render-all <a href='081print.mu.html#L4'>screen</a>, env, render +<span id="L212" class="LineNr">212 </span> env:&:environment <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L21'>new-programming-environment</a> <a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L4'>screen</a>, <span class="Constant">[]</span> +<span id="L213" class="LineNr">213 </span> <a href='004-programming-environment.mu.html#L445'>render-all</a> <a href='../081print.mu.html#L4'>screen</a>, env, <a href='001-editor.mu.html#L122'>render</a> <span id="L214" class="LineNr">214 </span> <span class="Comment"># create 2 sandboxes and scroll to second</span> <span id="L215" class="LineNr">215 </span> assume-console [ <span id="L216" class="LineNr">216 </span> press ctrl-n @@ -276,10 +276,10 @@ if ('onhashchange' in window) { <span id="L218" class="LineNr">218 </span> press F4 <span id="L219" class="LineNr">219 </span> type <span class="Constant">[add 1, 1]</span> <span id="L220" class="LineNr">220 </span> press F4 -<span id="L221" class="LineNr">221 </span> press page-down -<span id="L222" class="LineNr">222 </span> press page-down +<span id="L221" class="LineNr">221 </span> press <a href='003-shortcuts.mu.html#L2789'>page-down</a> +<span id="L222" class="LineNr">222 </span> press <a href='003-shortcuts.mu.html#L2789'>page-down</a> <span id="L223" class="LineNr">223 </span> ] -<span id="L224" class="LineNr">224 </span> event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, env, <a href='088file.mu.html#L11'>resources</a> +<span id="L224" class="LineNr">224 </span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L225" class="LineNr">225 </span> screen-should-contain [ <span id="L226" class="LineNr">226 </span> <span class="Constant"> . run (F4) .</span> <span id="L227" class="LineNr">227 </span> <span class="Constant"> . ╎─────────────────────────────────────────────────.</span> @@ -294,7 +294,7 @@ if ('onhashchange' in window) { <span id="L236" class="LineNr">236 </span> left-click<span class="Constant"> 2</span>,<span class="Constant"> 55</span> <span id="L237" class="LineNr">237 </span> ] <span id="L238" class="LineNr">238 </span> run [ -<span id="L239" class="LineNr">239 </span> event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, env, <a href='088file.mu.html#L11'>resources</a> +<span id="L239" class="LineNr">239 </span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L240" class="LineNr">240 </span> ] <span id="L241" class="LineNr">241 </span> <span class="Comment"># second sandbox shows in editor; scroll resets to display first sandbox</span> <span id="L242" class="LineNr">242 </span> screen-should-contain [ @@ -316,8 +316,8 @@ if ('onhashchange' in window) { <span id="L258" class="LineNr">258 </span> <span class="Comment"># initialize environment</span> <span id="L259" class="LineNr">259 </span> assume-resources [ <span id="L260" class="LineNr">260 </span> ] -<span id="L261" class="LineNr">261 </span> env:&:environment <span class="Special"><-</span> new-programming-environment <a href='088file.mu.html#L11'>resources</a>, <a href='081print.mu.html#L4'>screen</a>, <span class="Constant">[]</span> -<span id="L262" class="LineNr">262 </span> render-all <a href='081print.mu.html#L4'>screen</a>, env, render +<span id="L261" class="LineNr">261 </span> env:&:environment <span class="Special"><-</span> <a href='004-programming-environment.mu.html#L21'>new-programming-environment</a> <a href='../088file.mu.html#L11'>resources</a>, <a href='../081print.mu.html#L4'>screen</a>, <span class="Constant">[]</span> +<span id="L262" class="LineNr">262 </span> <a href='004-programming-environment.mu.html#L445'>render-all</a> <a href='../081print.mu.html#L4'>screen</a>, env, <a href='001-editor.mu.html#L122'>render</a> <span id="L263" class="LineNr">263 </span> <span class="Comment"># create 2 sandboxes</span> <span id="L264" class="LineNr">264 </span> assume-console [ <span id="L265" class="LineNr">265 </span> press ctrl-n @@ -326,7 +326,7 @@ if ('onhashchange' in window) { <span id="L268" class="LineNr">268 </span> type <span class="Constant">[add 1, 1]</span> <span id="L269" class="LineNr">269 </span> press F4 <span id="L270" class="LineNr">270 </span> ] -<span id="L271" class="LineNr">271 </span> event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, env, <a href='088file.mu.html#L11'>resources</a> +<span id="L271" class="LineNr">271 </span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L272" class="LineNr">272 </span> screen-should-contain [ <span id="L273" class="LineNr">273 </span> <span class="Constant"> . run (F4) .</span> <span id="L274" class="LineNr">274 </span> <span class="Constant"> . ╎ .</span> @@ -345,7 +345,7 @@ if ('onhashchange' in window) { <span id="L287" class="LineNr">287 </span> press F4 <span id="L288" class="LineNr">288 </span> ] <span id="L289" class="LineNr">289 </span> run [ -<span id="L290" class="LineNr">290 </span> event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, env, <a href='088file.mu.html#L11'>resources</a> +<span id="L290" class="LineNr">290 </span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L291" class="LineNr">291 </span> ] <span id="L292" class="LineNr">292 </span> <span class="Comment"># no change in contents</span> <span id="L293" class="LineNr">293 </span> screen-should-contain [ @@ -362,12 +362,12 @@ if ('onhashchange' in window) { <span id="L304" class="LineNr">304 </span> ] <span id="L305" class="LineNr">305 </span> <span class="Comment"># now try to scroll past end</span> <span id="L306" class="LineNr">306 </span> assume-console [ -<span id="L307" class="LineNr">307 </span> press page-down -<span id="L308" class="LineNr">308 </span> press page-down -<span id="L309" class="LineNr">309 </span> press page-down +<span id="L307" class="LineNr">307 </span> press <a href='003-shortcuts.mu.html#L2789'>page-down</a> +<span id="L308" class="LineNr">308 </span> press <a href='003-shortcuts.mu.html#L2789'>page-down</a> +<span id="L309" class="LineNr">309 </span> press <a href='003-shortcuts.mu.html#L2789'>page-down</a> <span id="L310" class="LineNr">310 </span> ] <span id="L311" class="LineNr">311 </span> run [ -<span id="L312" class="LineNr">312 </span> event-loop <a href='081print.mu.html#L4'>screen</a>, <a href='084console.mu.html#L23'>console</a>, env, <a href='088file.mu.html#L11'>resources</a> +<span id="L312" class="LineNr">312 </span> <a href='004-programming-environment.mu.html#L39'>event-loop</a> <a href='../081print.mu.html#L4'>screen</a>, <a href='../084console.mu.html#L23'>console</a>, env, <a href='../088file.mu.html#L11'>resources</a> <span id="L313" class="LineNr">313 </span> ] <span id="L314" class="LineNr">314 </span> <span class="Comment"># screen should show just final sandbox with the right index (1)</span> <span id="L315" class="LineNr">315 </span> screen-should-contain [ |