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

21
LINES

< > BotCompany Repo | #1028007 // Text Area with dictation [always appends to end]

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

Uses 911K of libraries. Click here for Pure Java version (9562L/50K).

!7

cmodule TextArea > DynRecordingTextArea {
  switchable bool listen;
  
  start {
    dm_onTopInput_q(voidfunc(S s) {
      if (listen) sendInput(s)
    });
  }
  
  visual withRightAlignedButtons(super,
    dm_boolFieldImageSwitch listen(#1102902, #1101635,
      onToolTip := "Listening to voice input (if a speech recognition is active)",
      offToolTip := "Not listening to voice input"));
      
  void sendInput(S s) {
    if (empty(s)) ret;
    setText(joinWithNewLine(text(), s));
  }
}

Author comment

Began life as a copy of #1016122

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: #1028007
Snippet name: Text Area with dictation [always appends to end]
Eternal ID of this version: #1028007/3
Text MD5: e6ab501eaae9aa685cceacde442894dc
Transpilation MD5: 529eba356d74ce4c1a9061cff80811b7
Author: stefan
Category: javax / gui
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-05-01 19:49:46
Source code size: 519 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 128 / 1935
Version history: 2 change(s)
Referenced in: [show references]