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

21
LINES

< > BotCompany Repo | #1029273 // Clear Top Input After A While

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 1113K of libraries. Click here for Pure Java version (6309L/31K).

!7

cm ClearTopInputAfterAWhile > DynPrintLogAndEnabled {
  switchable double seconds = 30;
  
  transient WaitForStableValue<S> value = new(seconds);
  
  start {
    dm_doEveryAndNow(5.0, r doIt);
  }
  
  void doIt {
    value.set(dm_topInput());
    S s = value!;
    if (nempty(s)) {
      print("Clearing top input: " + s);
      dm_setTopInput("");
      value.set("");
    }
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1029273
Snippet name: Clear Top Input After A While
Eternal ID of this version: #1029273/2
Text MD5: 0e69c3f797ddc8a0f68d6540c7a48966
Transpilation MD5: a86c1ca68ad56c216b88ff61872b8fa9
Author: stefan
Category: javax / stefan's os
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-14 00:51:53
Source code size: 408 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 130 / 355716
Version history: 1 change(s)
Referenced in: [show references]