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

41
LINES

< > BotCompany Repo | #1001760 // Quick Talk Window (talk to bot selected in swing-top 2, no actual functionality yet)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Transpiled version (2544L) is out of date.

!747
!named thread
!awt {

m {
  static JLabel botName, botAddress;
  static S currentPort;

  p {
    makeAndroid3("Quick Talk Window.");
    
    showFrame("Quick Talk", stack(
      botName = new JLabel("Bot name:"),
      "Bot ID:",
      botAddress = new JLabel("Bot address:"),
      "Your input:",
      new JTextField(),
      "Bot answer:",
      new JTextField()));
      
    updateLoop(200);
  }
  
  static void update() {
    startBot("Get Selected Table Line Bot", "#1001746");
    S answer = sendToLocalBot("Get Selected Table Line Bot", "get selected table line as map");
    if (!isMap(answer)) ret;
    
    Map<S, S> m = (Map) unstructure(answer);
    final S name = m.get("Hello message");
    final S port = m.get("Port");
    
    if (port != null && port != currentPort) {
      currentPort = port;
      awt {
        botName.setText("Bot name: " + (name == null ? "?" : name));
        botAddress.setText("Bot address: " + port);
      }
    }
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001760
Snippet name: Quick Talk Window (talk to bot selected in swing-top 2, no actual functionality yet)
Eternal ID of this version: #1001760/1
Text MD5: 87e2a67fe34554f355ee4fbbbaf1cb5b
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-11-14 18:57:31
Source code size: 1015 bytes / 41 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 681 / 654
Referenced in: #1001787 - Quick Talk Window 2
#3000190 - Answer for stefanreich(>> t 20 questions)
#3000202 - Answer for stefanreich (>> T conversion bot)
#3000238 - Answer for stefanreich (>> t power bot)
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)