From a654e4ecace2d506d1b10f1dde2c287ebe84ef37 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 26 Mar 2016 23:59:59 -0700 Subject: 2812 --- html/edit/005-sandbox.mu.html | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'html/edit/005-sandbox.mu.html') diff --git a/html/edit/005-sandbox.mu.html b/html/edit/005-sandbox.mu.html index 55e666cb..77cd3727 100644 --- a/html/edit/005-sandbox.mu.html +++ b/html/edit/005-sandbox.mu.html @@ -3,28 +3,36 @@ Mu - edit/005-sandbox.mu - - + + - + + + + -
+
 ## running code from the editor and creating sandboxes
 #
 # Running code in the sandbox editor prepends its contents to a list of
@@ -154,15 +162,13 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
   {
     do-run?:boolean <- equal *k, 65532/F4
     break-unless do-run?
-    status:address:shared:array:character <- new [running...       ]
-    screen <- update-status screen, status, 245/grey
+    screen <- update-status screen, [running...       ], 245/grey
     error?:boolean, env, screen <- run-sandboxes env, screen
     # F4 might update warnings and results on both sides
     screen <- render-all screen, env
     {
       break-if error?
-      status:address:shared:array:character <- new [                 ]
-      screen <- update-status screen, status, 245/grey
+      screen <- update-status screen, [                 ], 245/grey
     }
     screen <- update-cursor screen, recipes, current-sandbox, *sandbox-in-focus?, env
     loop +next-event:label
@@ -250,7 +256,6 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
   # first clear previous versions, in case we deleted some sandbox
   $system [rm lesson/[0-9]* >/dev/null 2>/dev/null]  # some shells can't handle '>&'
   curr:address:shared:sandbox-data <- get *env, sandbox:offset
-  suffix:address:shared:array:character <- new [.out]
   idx:number <- copy 0
   {
     break-unless curr
@@ -355,7 +360,6 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
   local-scope
   load-ingredients
   # read all scenarios, pushing them to end of a list of scenarios
-  suffix:address:shared:array:character <- new [.out]
   idx:number <- copy 0
   curr:address:address:shared:sandbox-data <- get-address *env, sandbox:offset
   {
@@ -368,7 +372,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
     *data <- copy contents
     # restore expected output for sandbox if it exists
     {
-      filename <- append filename, suffix
+      filename <- append filename, [.out]
       contents <- restore filename
       break-unless contents
       <end-restore-sandbox>
@@ -390,8 +394,7 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
   load-ingredients
   return-unless sandbox-screen
   # print 'screen:'
-  header:address:shared:array:character <- new [screen:]
-  row <- render screen, header, left, right, 245/grey, row
+  row <- render screen, [screen:], left, right, 245/grey, row
   screen <- move-cursor screen, row, left
   # start printing sandbox-screen
   column:number <- copy left
@@ -995,3 +998,4 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color
 
+ -- cgit 1.4.1-2-gfad0