Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

35
LINES

< > BotCompany Repo | #1016432 // Simple Snippet Search [Dyn Module]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (7740L/41K).

1  
!7
2  
3  
cmodule It > DynCalculatedList {
4  
  int max = 100;
5  
  transient S searched;
6  
  transient LS results;
7  
  transient OptionalInputPanel inputPanel;
8  
  transient ReliableSingleThread rst;
9  
  
10  
  visualize {
11  
    rst = new ReliableSingleThread(r search);
12  
    inputPanel = new OptionalInputPanel;
13  
    awtCalcEveryAndNow(inputPanel.panel(), 60.0, rst);
14  
    JComponent sup = super.visualize();
15  
    ret northAndCenter(wrap(inputPanel), sup);
16  
  }
17  
  
18  
  void update {
19  
    rst.trigger();
20  
    super.update();
21  
  }
22  
23  
  void search {
24  
    temp enter();
25  
    S s = inputPanel == null ? null : inputPanel.input();
26  
    if (neq(s, searched)) {
27  
      searched = s;
28  
      if (s == null) results = null;
29  
      else results = snippetsWithTitles(tbSearch(max, inputPanel.input()));
30  
      updateMe();
31  
    }
32  
  }
33  
  
34  
  LS calc() { ret results; }
35  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1016432
Snippet name: Simple Snippet Search [Dyn Module]
Eternal ID of this version: #1016432/10
Text MD5: 4dcb23ad7adce58009df8f3f4f43618e
Transpilation MD5: f9946955b6f1eb41d1750577da7abfa1
Author: stefan
Category: javax / stefan's os
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-12-20 18:41:41
Source code size: 843 bytes / 35 lines
Pitched / IR pitched: No / No
Views / Downloads: 333 / 4799
Version history: 9 change(s)
Referenced in: [show references]