!7 static JList lRelBots; static RelBot bot; PersistentLister > MyLister { S name; } p { subst(); ttWordWrap(); centerHigherConsole(); saveConceptsQuietly(); db(); swing { lRelBots = jlist(); addToWindowSplitRight_aggressive(consoleFrame(), withTitle("Rel Bots", centerAndSouth(lRelBots, jline(jbutton("New Bot...", f newBot))))); onDoubleClick(lRelBots, voidfunc(S name) { setBot(uniq(MyLister, +name), false) }); } updateList(); setAll(botIfMain2(), newLineAboveAnswer := true, newLineBelowAnswer := true); } answer { try answer callAnswerMethod(bot, s); } svoid newBot { final JTextField tfName = jtextfield(); showFormTitled("New Bot", 'Name, tfName, r { setBot(uniq(MyLister, name := getTextTrim(tfName)), true) }); } svoid setBot(MyLister bot, bool updateList) { main.bot = new RelBot(bot); consoleTitleStatus(bot.name); if (updateList) updateList(); } svoid updateList { fillListWithStrings(lRelBots, sorted(collect(MyLister, 'name))); }