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: | 282 / 331 |
Version history: | 5 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1020258 - dm_feedTopInputToTextField |