Download Jar. Uses 3874K of libraries. Click here for Pure Java version (8285L/56K).
1 | !7 |
2 | |
3 | static DynamicVStack stack; |
4 | static O module; |
5 | static S moduleID; |
6 | static java.util.Timer moduleRestarter; |
7 | |
8 | p-subst {
|
9 | autoRestart(); |
10 | defaultFrameIcon(#1101180); |
11 | stack = dynamicVStack(); // spaces only between components |
12 | showFrame(jscroll(withMargin(5, stack))); |
13 | |
14 | repeat with sleep 1 {
|
15 | updateModule(); |
16 | L<Pair<S, O>> l = (L) quickImport(callOpt(module, 'suggest)); |
17 | if (l != null) {
|
18 | stack.clearComponents(); |
19 | for (final Pair<S, O> p : l) |
20 | stack.addComponent(jMarginButton(p.a, r-thread {
|
21 | appendToMechList_noUniq_inQ("Suggested buttons clicked by user", now() + ": " + p.a);
|
22 | callF(p.b); |
23 | })); |
24 | } |
25 | } |
26 | } |
27 | |
28 | svoid updateModule {
|
29 | S moduleID = first(mL("Best suggester module"));
|
30 | if (neq(moduleID, main.moduleID)) {
|
31 | if (main.moduleID != null) infoBox("Switching to module " + moduleID);
|
32 | stopTimer(moduleRestarter); |
33 | main.moduleID = moduleID; |
34 | moduleRestarter = loadAndAutoRestartModule('module, moduleID);
|
35 | } |
36 | } |
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: | #1014645 |
| Snippet name: | Suggester (OK) |
| Eternal ID of this version: | #1014645/18 |
| Text MD5: | 7c6d81e72dcf5221570bc92eb7966991 |
| Transpilation MD5: | 5aed4919d6d87e3455f859657543e4ba |
| Author: | stefan |
| Category: | javax / a.i. / gui |
| Type: | JavaX source code (desktop) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-05-07 12:43:38 |
| Source code size: | 1026 bytes / 36 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 762 / 8074 |
| Version history: | 17 change(s) |
| Referenced in: | [show references] |