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

12
LINES

< > BotCompany Repo | #1019861 // dm_mergeWithTopInput

JavaX fragment (include)

static JTextField dm_mergeWithTopInput(final JTextField tf) {
  final DynModule m = dm_current_mandatory();
  final Var<Bool> loopPreventer = new(false);
  onChange(tf, r { if (!loopPreventer!) dm_setTopInput(getText(tf)) });
  dm_onTopInputChanged(voidfunc(fS s) {
    switch to m.q();
    temp tempSetVar(loopPreventer, true);
    setText(tf, s);
  });
  onEnter(tf, rThread { dm_setTopInputAndFireWithInfo(getText(tf), "typed") });
  ret tf;
}

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: 280 / 329
Version history: 5 change(s)
Referenced in: [show references]