Libraryless. Click here for Pure Java version (17766L/130K).
!7 concept Distinction { S concept, cases; } module Distinctions > DynCRUD<Distinction> { *() { super(Distinction); } afterVisualize { replaceComponent(crud.tableSearcher.tfInput, func(JComponent c) -> JComponent { centerAndEastWithMargin(c, jbutton("Add distinction...", rThread { define(searchTerm()) })) }); onEnter(crud.tableSearcher.tfInput, rThread { define(searchTerm()) }); } void define(fS term) enter { final JTextField tfConcept = jtextfield(or2(term, dm_topInput())), tfCases = jtextfield(); showFormTitled("Add Rule", "Concept:", tfConcept, "Cases (use slashes):", tfCases, rThread { S concept = gtt(tfConcept), cases = gtt(tfCases); uniq_sync(Distinction, +concept, +cases); }); focus(nempty(term) ? tfCases : tfConcept); } }
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: | #1019794 |
Snippet name: | Distinctions [Dyn Module] |
Eternal ID of this version: | #1019794/3 |
Text MD5: | 264a7d24422398cebe8c41d78d54f7c6 |
Transpilation MD5: | be83367e4da06c81d9dfd9c726f38803 |
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-26 20:58:04 |
Source code size: | 872 bytes / 30 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 292 / 2438 |
Version history: | 2 change(s) |
Referenced in: | [show references] |