!7 cprint { transient JTextArea transpilationErrorBox; start-thread { dm_onSnippetEdited(voidfunc(S snippetID) { if (!sameSnippetID(snippetID, #1030833)) ret; //transpileOnServerWithErrorWindow(#1030602, true, null); try { Pair p = transpileHereOrOnServer(snippetID, medium); awt { if (p.a) { status("Transpiled OK!"); hideWindow(transpilationErrorBox); transpilationErrorBox = null; callFInNewThread(onSuccess); } else { S text = htmlDecode(htmlDecode(p.b)); /// XXX status("Transpilation error. " + text); bool first = transpilationErrorBox == null; transpilationErrorBox = maximizeFrame(scrollAllTheWayDown(showText_fast_noWrap(transpilationErrorBox, "Transpilation Error", text))); if (first) { setFrameIcon(#1101268, transpilationErrorBox); addButtonsToWindow(transpilationErrorBox, "Medium transpile", r { _transpile(true) }); } } } } catch print e { status("Transpilation problem. " + e); } }); } void status(S s) { infoBox(s); } }