Uses 3874K of libraries. Click here for Pure Java version (10226L/70K/244K).
1 | !7 |
2 | |
3 | static JList lRelBots; |
4 | static RelBot bot; |
5 | |
6 | PersistentLister > MyLister { S name; } |
7 | |
8 | p { |
9 | subst(); ttWordWrap(); centerHigherConsole(); saveConceptsQuietly(); db(); |
10 | swing { |
11 | lRelBots = jlist(); |
12 | addToWindowSplitRight_aggressive(consoleFrame(), |
13 | withTitle("Rel Bots", centerAndSouth(lRelBots, |
14 | jline(jbutton("New Bot...", f newBot))))); |
15 | onDoubleClick(lRelBots, voidfunc(S name) { setBot(uniq(MyLister, +name), false) }); |
16 | } |
17 | updateList(); |
18 | setAll(botIfMain2(), newLineAboveAnswer := true, newLineBelowAnswer := true); |
19 | } |
20 | |
21 | answer { try answer callAnswerMethod(bot, s); } |
22 | |
23 | svoid newBot { |
24 | final JTextField tfName = jtextfield(); |
25 | showFormTitled("New Bot", |
26 | 'Name, tfName, |
27 | r { setBot(uniq(MyLister, name := getTextTrim(tfName)), true) }); |
28 | } |
29 | |
30 | svoid setBot(MyLister bot, bool updateList) { |
31 | main.bot = new RelBot(bot); |
32 | consoleTitleStatus(bot.name); |
33 | if (updateList) updateList(); |
34 | } |
35 | |
36 | 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: | 331 / 489 |
Version history: | 13 change(s) |
Referenced in: | [show references] |