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

13
LINES

< > BotCompany Repo | #1016482 // actionListenerInNewThread - including an instance to hold

JavaX fragment (include)

static ActionListener actionListenerInNewThread(fO runnable) {
  ret actionListenerInNewThread(runnable, null);
}

static ActionListener actionListenerInNewThread(fO runnable, fO instanceToHold) {
  if (runnable instanceof ActionListener) ret (ActionListener) runnable;
  ret actionListener {
    thread "Action Listener" {
      temp holdInstance(instanceToHold);
      callF(runnable);
    }
  };
}

Author comment

Began life as a copy of #1006027

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016482
Snippet name: actionListenerInNewThread - including an instance to hold
Eternal ID of this version: #1016482/4
Text MD5: 00e8ef357517aa7a0db7dff05b65147e
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-03-23 12:34:52
Source code size: 412 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 348 / 395
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)