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

14
LINES

< > BotCompany Repo | #1016096 // cleanExitOnFrameClose_ifStillInSameFrame

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

Libraryless. Click here for Pure Java version (2651L/17K).

static void cleanExitOnFrameClose_ifStillInSameFrame(Component c) {
  cleanExitOnFrameClose_ifStillInSameFrame(c, null);
}

static void cleanExitOnFrameClose_ifStillInSameFrame(final Component c, IF0<Bool> confirm) {
  final Window w = getWindow(c);
  if (w == null) ret;
  onWindowClosing(w, r {
    if (getWindow(c) == w) thread {
      if (!isFalse(callF(confirm)))
        cleanKillVM();
    }
  });
}

Author comment

Began life as a copy of #1009945

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: #1016096
Snippet name: cleanExitOnFrameClose_ifStillInSameFrame
Eternal ID of this version: #1016096/3
Text MD5: 08083a16e055ab4c870e2d63ff1d31ac
Transpilation MD5: 2c084dead196ca3b12ed4d261cfd9291
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-29 18:12:36
Source code size: 418 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 429 / 506
Version history: 2 change(s)
Referenced in: [show references]