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

14
LINES

< > BotCompany Repo | #1015848 // tablePopupMenuItemsThreaded - adds to the menu if it already exists, runs actions in new thread with messagebox on error

JavaX fragment (include)

1  
// action: voidfunc(int row)
2  
static JTable tablePopupMenuItemsThreaded(final JTable table, O... params) {
3  
  for (int i = 0; i+1 < l(params); i += 2) {
4  
    fO action = params[i+1];
5  
    fO threadInfo = _threadInfo();
6  
    tablePopupMenuItem(table, str(params[i]), voidfunc(final int row) {
7  
      _threadInheritInfo(threadInfo);
8  
      thread-messagebox {
9  
        callF(action, row);
10  
      }
11  
    });
12  
  }
13  
  ret table;
14  
}

Author comment

Began life as a copy of #1015826

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: #1015848
Snippet name: tablePopupMenuItemsThreaded - adds to the menu if it already exists, runs actions in new thread with messagebox on error
Eternal ID of this version: #1015848/9
Text MD5: 24f2eeb3dfd0a168315418a6c549af15
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-05 14:29:16
Source code size: 426 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 490 / 563
Version history: 8 change(s)
Referenced in: [show references]