scope transpileOnServerWithErrorWindow. sclass #DaClass { S snippetID; JTextArea transpilationErrorBox; Runnable onSuccess; void go(bool medium) { final Pair p = transpileOnServer(snippetID, medium ? "medium" : "quick"); awt { if (p.a) { infoBox("Transpiled OK!"); hideWindow(transpilationErrorBox); transpilationErrorBox = null; callFInNewThread(onSuccess); } else { infoBox("Transpilation error. " + p.b); bool first = transpilationErrorBox == null; transpilationErrorBox = showText(transpilationErrorBox, "Transpilation Error", p.b); if (first) { setFrameIcon(#1101268, transpilationErrorBox); addButtonsToWindow(transpilationErrorBox, "Medium transpile", rThread { go(true) }); } } } } } svoid transpileOnServerWithErrorWindow(S snippetID, bool medium, final Runnable onSuccess) { nu(DaClass, +snippetID, +onSuccess).go(medium); } end scope