sclass TranspileWithErrorWindow { S snippetID; JFastLogView_noWrap transpilationErrorBox; event success; event error(Throwable error); TranspileForServer_v2 tfs; *(S *snippetID) { tfs = new TranspileForServer_v2(snippetID); } void transpile { tfs.run(); } run { 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", str(e)))); if (first) { setFrameIcon(#1101268, transpilationErrorBox); addButtonsToWindow(transpilationErrorBox, jbuttonWithDisable("Medium transpile", r run) ); } } error(e); ret; } infoBox("Transpiled OK!"); hideWindow(transpilationErrorBox); transpilationErrorBox = null; success(); } selfType coresToUse(int coresToUse) { tfs.runTranspiler.coresToUse(coresToUse); this; } }