From 5c6587d004afa038a57da9e9e30b2b8944ca0201 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 15 Sep 2015 20:22:13 -0700 Subject: 2203 - show recipe warnings in 'mu sandbox' --- sandbox/005-sandbox.mu | 3 ++- sandbox/010-warnings.mu | 14 ++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/sandbox/005-sandbox.mu b/sandbox/005-sandbox.mu index f3cf94a8..9cbd1d08 100644 --- a/sandbox/005-sandbox.mu +++ b/sandbox/005-sandbox.mu @@ -224,7 +224,7 @@ recipe! render-sandbox-side [ row <- add row, 1 draw-horizontal screen, row, left, right, 9473/horizontal-double sandbox:address:sandbox-data <- get *env, sandbox:offset - row, screen <- render-sandboxes screen, sandbox, left, right, row + row, screen <- render-sandboxes screen, sandbox, left, right, row, env clear-rest-of-screen screen, row, left, left, right reply screen/same-as-ingredient:0 ] @@ -236,6 +236,7 @@ recipe render-sandboxes [ left:number <- next-ingredient right:number <- next-ingredient row:number <- next-ingredient + env:address:programming-environment-data <- next-ingredient reply-unless sandbox, row/same-as-ingredient:4, screen/same-as-ingredient:0 screen-height:number <- screen-height screen at-bottom?:boolean <- greater-or-equal row, screen-height diff --git a/sandbox/010-warnings.mu b/sandbox/010-warnings.mu index 077deafb..39dc5691 100644 --- a/sandbox/010-warnings.mu +++ b/sandbox/010-warnings.mu @@ -12,14 +12,7 @@ recipe! update-recipes [ in:address:array:character <- restore [recipes.mu] recipe-warnings:address:address:array:character <- get-address *env, recipe-warnings:offset *recipe-warnings <- reload in - # if recipe editor has errors, stop - { - break-unless *recipe-warnings - status:address:array:character <- new [errors found] - update-status screen, status, 1/red - reply 1/errors-found, env/same-as-ingredient:0, screen/same-as-ingredient:1 - } - reply 0/no-errors-found, env/same-as-ingredient:0, screen/same-as-ingredient:1 + reply 0/show-recipe-warnings-in-sandboxes, env/same-as-ingredient:0, screen/same-as-ingredient:1 ] before [ @@ -59,6 +52,11 @@ after [ sandbox-warnings:address:array:character <- get *sandbox, warnings:offset break-unless sandbox-warnings *response-starting-row <- copy 0 # no response + { + break-unless env + recipe-warnings:address:array:character <- get *env, recipe-warnings:offset + row, screen <- render-string screen, recipe-warnings, left, right, 1/red, row + } row, screen <- render-string screen, sandbox-warnings, left, right, 1/red, row # don't try to print anything more for this sandbox jump +render-sandbox-end:label -- cgit 1.4.1-2-gfad0