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

13
LINES

< > BotCompany Repo | #1026274 // eleu_chatBots_copyQAs

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2217L/14K).

svoid eleu_chatBots_copyQAs(S sourceBotID, S destBotID, long... qaIDs) {
  virtual Concepts concepts = conceptsOfLoadedProgram_directRef(eleuBot(sourceBotID));
  O dest = eleuBot(destBotID);
  if (concepts == null) fail("Source bot not found: " + sourceBotID);
  if (dest == null) fail("Dest bot not found: " + destBotID);
  for (long id : qaIDs) {
    virtual QA qa = call(concepts, 'getConcept, id);
    if (qa == null) continue with print("QA not found: " + id);
    if (shortClassNameNeq QA(qa)) continue with print("Not a QA: " + qa);
    print("Copying QA: " + id);
    call(dest, 'importQA, qa);
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1026274
Snippet name: eleu_chatBots_copyQAs
Eternal ID of this version: #1026274/4
Text MD5: 68ae8d222aa167f9b684b86aa2d32503
Transpilation MD5: aaea7c7da47dca0826faa5160ee7e6f6
Author: stefan
Category: javax / html
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-12-10 13:10:15
Source code size: 620 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 116 / 160
Version history: 3 change(s)
Referenced in: [show references]