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

27
LINES

< > BotCompany Repo | #1015260 // preload

JavaX fragment (include)

sbool preload_done;

static void preload(S vars, O sow, O reap) {
  if (preload_done)
    callF(reap);
  else {
    final new Flag goOn;
    final Var<S> nextProgramID = new(programID());
    showButtons("Go on", r {
      hideControls(); // hide button again
      goOn.raise();
    }, "Go on as...", r {
      selectSnippetID(voidfunc(S snippetID) {
        hideControls();
        nextProgramID.set(snippetID);
        goOn.raise();
      });
    });
    callF(sow);
    print("Preload done");
    goOn.waitUntilUp();
    Class c = hotwireDependent(nextProgramID!);
    setOpt(c, preload_done := true);
    copyFields(mc(), c, splitAtSpace(vars));
    callMain(c);
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1015260
Snippet name: preload
Eternal ID of this version: #1015260/9
Text MD5: 709cfb75fc78dcfc672d188a21ca1aea
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-11 04:07:43
Source code size: 699 bytes / 27 lines
Pitched / IR pitched: No / No
Views / Downloads: 441 / 480
Version history: 8 change(s)
Referenced in: [show references]