Libraryless. Click here for Pure Java version (17765L/130K).
!7 concept Equivalent { S a, b; } module Equivalents > DynCRUD<Equivalent> { *() { super(Equivalent); } afterVisualize { replaceComponent(crud.tableSearcher.tfInput, func(JComponent c) -> JComponent { centerAndEastWithMargin(c, jbutton("Define...", rThread { define(searchTerm()) })) }); onEnter(crud.tableSearcher.tfInput, rThread { define(searchTerm()) }); } void define(fS term) enter { final JTextField tfWord = jtextfield(or2(term, dm_topInput())), tfDefinition = jtextfield(); showFormTitled("Add Equivalent", "Word/phrase:", tfWord, "Equivalent word/phrase:", tfDefinition, rThread { S a = gtt(tfWord), b = gtt(tfDefinition); uniq_sync(Equivalent, +a, +b); }); focus(nempty(term) ? tfDefinition : tfWord); } }
Began life as a copy of #1019714
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: | #1019795 |
Snippet name: | Equivalents [Dyn Module] |
Eternal ID of this version: | #1019795/3 |
Text MD5: | 26ea1ac1fd90da4d2964cd76b0830d24 |
Transpilation MD5: | 6b3b4aa2a03cf99227100dfb7008ff89 |
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 21:49:58 |
Source code size: | 849 bytes / 30 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 314 / 682 |
Version history: | 2 change(s) |
Referenced in: | -