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

15
LINES

< > BotCompany Repo | #1010426 // ensureDBNotRunning - tries to activate its frames if possible

JavaX fragment (include)

static void ensureDBNotRunning(S name) {
  if (hasBot(name)) {
    pcall {
      S framesBot = dropSuffix(".", name) + " Frames";
      print("Trying to activate frames of running DB: " + framesBot);
      if (isOK(sendOpt(framesBot, "activate frames")) && isMainProgram())
        cleanKill();
    }
    fail("Already running: " + name);
  }
}

static void ensureDBNotRunning() {
  ensureDBNotRunning(dbBotStandardName());
}

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: #1010426
Snippet name: ensureDBNotRunning - tries to activate its frames if possible
Eternal ID of this version: #1010426/4
Text MD5: 8eea580157fffced8f9c3d7f971a60cd
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-21 08:59:03
Source code size: 439 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 471 / 500
Version history: 3 change(s)
Referenced in: [show references]