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

30
LINES

< > BotCompany Repo | #1019871 // Features [Dyn Module]

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

Libraryless. Click here for Pure Java version (17765L/129K).

1  
!7
2  
3  
concept Feature {
4  
  S feature, status;
5  
}
6  
7  
module Features > DynCRUD<Feature> {
8  
  *() { super(Feature); }
9  
  
10  
  afterVisualize {
11  
    replaceComponent(crud.tableSearcher.tfInput, func(JComponent c) -> JComponent {
12  
      centerAndEastWithMargin(c, jbutton("Add feature...", rThread {
13  
        addFeature(searchTerm())
14  
      }))
15  
    });
16  
    onEnter(crud.tableSearcher.tfInput, rThread { addFeature(searchTerm()) });
17  
  }
18  
  
19  
  void addFeature(fS term) enter {
20  
    final JTextField tf1 = jtextfield(or2(term, dm_topInput())), tf2 = jtextfield();
21  
    showFormTitled("Add Feature",
22  
      "Feature:", tf1,
23  
      "Status:", tf2,
24  
      rThread {
25  
        S feature = gtt(tf1), status = gtt(tf2);
26  
        uniq_sync(Feature, +feature, +status);
27  
      });
28  
    focus(nempty(term) ? tf2 : tf1);
29  
  }
30  
}

Author comment

Began life as a copy of #1019783

download  show line numbers  debug dex  old transpilations   

Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019871
Snippet name: Features [Dyn Module]
Eternal ID of this version: #1019871/4
Text MD5: fb08f02aafbf35e958e92ca4602a30ad
Transpilation MD5: ff02eac54b1b4c6e921fc580eb4b372c
Author: stefan
Category: javax / a.i.
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-30 01:56:59
Source code size: 813 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 253 / 383
Version history: 3 change(s)
Referenced in: [show references]