Uses 3874K of libraries. Click here for Pure Java version (10226L/70K/244K).
!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))); }
Began life as a copy of #1009475
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1009479 |
Snippet name: | Multiple RelBots [dev.] |
Eternal ID of this version: | #1009479/14 |
Text MD5: | fab529ead6639d121509de1273614494 |
Transpilation MD5: | 55baa9c8216cfcadd185aac0c2c97243 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-08-04 02:50:15 |
Source code size: | 1040 bytes / 36 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 330 / 487 |
Version history: | 13 change(s) |
Referenced in: | [show references] |