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

29
LINES

< > BotCompany Repo | #1027562 // Scenarios DB rewrite with NameBasedVoiceCRUD

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

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

!7

concept Scenario {
  S name;
  LS conditions;
  LS actions;

  toString { ret "Scenario " + quote(name); }
}

cmodule Scenarios > DynCRUD<Scenario> {
  NameBasedVoiceCRUD scenariosCRUD = new(Scenario, "scenario");
  
  !include #1027563 // Undo Manager
  
  S answer(S s) {
    ret dm_q(() -> {
      print("answering: " + s);
      try answer undoActions(s);
      ret scenariosCRUD.answer(s);
    });
  }

  afterVisualize {
    addComponent(crud.buttons, jbutton("Talk to me", rThread talkToMe));
  }

  void talkToMe enter { dm_showConversationPopupForModule(); }
}

Author comment

Began life as a copy of #1027443

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: #1027562
Snippet name: Scenarios DB rewrite with NameBasedVoiceCRUD
Eternal ID of this version: #1027562/4
Text MD5: 2651587321a8dfdf9afa344f53a9403c
Transpilation MD5: 0c86847846001a56147044276ee1e0af
Author: stefan
Category: javax / scenarios
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-23 22:48:02
Source code size: 603 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 142 / 261
Version history: 3 change(s)
Referenced in: [show references]