!7 cmodule PhilosophyBotTextArea > DynTextArea { S output, logicRules; transient PhilosophyBot1 bot; transient ReliableSingleThread rstRunProgram = dm_rst(this, r runProgram); transient JLabel lblStatus; transient ReliableSingleThread rstLogicRules = dm_rst(this, r showLogicRules); visual jvsplit( jCenteredSection("Program", super), centerAndSouth( jhsplit( jCenteredSection("Output", dm_textArea_scrollDown_readOnly output()), jCenteredSection("Logic rules", dm_textArea_scrollDown_readOnly logicRules()) ), withRightMargin(lblStatus = jRightAlignedLabel()))); start { grabInterval = 1.0; dm_watchFieldAndNow text(rstRunProgram); } void runProgram { temp tempMiniLoadingAnim(); time { setField(output := hijackPrint(r { pcall { bot = new PhilosophyBot1(text); bot.onLogicRuleAdded.add(rule -> rstLogicRules.run()); bot.standardImports(); bot.run(); bot.checkExpectations(); } })); } main setText(lblStatus, lastTiming_formatted()); } void showLogicRules { setField(logicRules := joinWithEmptyLines(allToString(cloneList(bot.logicRules))); } }