diff options
| author | Omar Rizwan <omar@omar.website> | 2023-10-23 23:28:27 +0000 |
|---|---|---|
| committer | Omar Rizwan <omar@omar.website> | 2023-10-23 23:28:27 +0000 |
| commit | 7bb042fe71ec1532afb970b727241eaf24c7808d (patch) | |
| tree | 7b57c0b1fa2e7e4214fd639c5a97cbf7f7bca5c2 /virtual-programs | |
| parent | display: Warn instead of error for deprecated methods (diff) | |
| download | folk-7bb042fe71ec1532afb970b727241eaf24c7808d.tar.gz folk-7bb042fe71ec1532afb970b727241eaf24c7808d.zip | |
web-editor: Hacks so slower glslc errors propagate to editor in time
Diffstat (limited to 'virtual-programs')
| -rw-r--r-- | virtual-programs/new-program-web-editor.folk | 8 | ||||
| -rw-r--r-- | virtual-programs/web-editor.folk | 9 |
2 files changed, 10 insertions, 7 deletions
diff --git a/virtual-programs/new-program-web-editor.folk b/virtual-programs/new-program-web-editor.folk index a7c176cc..f972cfc7 100644 --- a/virtual-programs/new-program-web-editor.folk +++ b/virtual-programs/new-program-web-editor.folk @@ -152,12 +152,14 @@ Wish the web server handles route "/new" with handler { Assert web claims {${program}} has program code {${code}} if {$::isLaptop} { Step } `); - setTimeout(() => { - send(` + [500, 1000, 3000].forEach(timeout => { + setTimeout(() => { + send(` set errors [Statements::findMatches [list {${program}} has error /err/ with info /errorInfo/]] ::websocket::send $chan text [join [list "Error:" {*}[lmap e $errors {dict get $e errorInfo}]] "\n"] `); - }, 500); + }, timeout); + }); } let jobid; function handlePrint() { diff --git a/virtual-programs/web-editor.folk b/virtual-programs/web-editor.folk index 245b6043..fb899560 100644 --- a/virtual-programs/web-editor.folk +++ b/virtual-programs/web-editor.folk @@ -96,13 +96,14 @@ Wish the web server handles route {/page/(.*)$} with handler { send(`EditVirtualProgram file_name {${code}}`) } - - setTimeout(() => { - send(` + [500, 1000, 3000].forEach(timeout => { + setTimeout(() => { + send(` set errors [Statements::findMatches [list program_id has error /err/ with info /errorInfo/]] ::websocket::send $chan text [join [list "Error:" {*}[lmap e $errors {dict get $e errorInfo}]] "\n"] `); - }, 500); + }, 500); + }); } let jobid; |
