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

12
LINES

< > BotCompany Repo | #1019861 // dm_mergeWithTopInput

JavaX fragment (include)

1  
static JTextField dm_mergeWithTopInput(final JTextField tf) {
2  
  final DynModule m = dm_current_mandatory();
3  
  final Var<Bool> loopPreventer = new(false);
4  
  onChange(tf, r { if (!loopPreventer!) dm_setTopInput(getText(tf)) });
5  
  dm_onTopInputChanged(voidfunc(fS s) {
6  
    switch to m.q();
7  
    temp tempSetVar(loopPreventer, true);
8  
    setText(tf, s);
9  
  });
10  
  onEnter(tf, rThread { dm_setTopInputAndFireWithInfo(getText(tf), "typed") });
11  
  ret tf;
12  
}

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: #1019861
Snippet name: dm_mergeWithTopInput
Eternal ID of this version: #1019861/6
Text MD5: 2cfdca52ba1618d2199a166e42535073
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-29 10:58:12
Source code size: 457 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 281 / 330
Version history: 5 change(s)
Referenced in: [show references]