sclass TranspileWithErrorWindow { S snippetID; JFastLogView_noWrap transpilationErrorBox; Runnable onSuccess; event success; event error(Throwable error); TranspileForServer_v2 tfs; *(S *snippetID) { tfs = new TranspileForServer_v2(snippetID); } void transpile { tfs.run(); } void go(bool medium) { infoBox("Transpiling " + snippetID); try { transpile(); } catch e { infoBox("Transpilation error. " + e); awt { bool first = transpilationErrorBox == null; transpilationErrorBox = maximizeFrame(scrollAllTheWayDown(showText_fast_noWrap(transpilationErrorBox, "Transpilation Error", p.b))); if (first) { setFrameIcon(#1101268, transpilationErrorBox); addButtonsToWindow(transpilationErrorBox, jbuttonWithDisable("Medium transpile", r go) ); } } error(e); ret; } infoBox("Transpiled OK!"); hideWindow(transpilationErrorBox); transpilationErrorBox = null; success(); } }