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

18
LINES

< > BotCompany Repo | #1023293 // dm_sendToAllAttractorBots

JavaX fragment (include)

svoid dm_sendToAllAttractorBots(S input, VF1<S> onResponse) {
  LS modules = dm_attractorBotModules();
  for (S mod : modules) {
    continue if dm_isMe(mod);
    LS msgs = synchroList();
    {
      temp vmBus_onMessage aBotSaid(voidfunc(O mod2, S output) {
        print("Got " + output + " from " + mod2);
        if (dm_sameModule(mod, mod2))
          msgs.add(output);
      });
      //print("Calling: " + dm_moduleName(mod));
      dm_call(mod, 'submitInput, input);
    }
    for (S msg : msgs)
      callF(onResponse, msg);
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1023293
Snippet name: dm_sendToAllAttractorBots
Eternal ID of this version: #1023293/2
Text MD5: 1a1f6e2bb79905ca10801e73fe90ec42
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-05-24 17:25:50
Source code size: 556 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 184 / 231
Version history: 1 change(s)
Referenced in: [show references]