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

15
LINES

< > BotCompany Repo | #1019046 - tablePopupMenuItemsThreaded_top - 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_top(final JTable table, O... params) {
3  
  params = reverseParams(params);
4  
  for (int i = 0; i+1 < l(params); i += 2) {
5  
    fO action = params[i+1];
6  
    fO threadInfo = _threadInfo();
7  
    tablePopupMenuItem_top(table, str(params[i]), voidfunc(final int row) {
8  
      _threadInheritInfo(threadInfo);
9  
      thread-messagebox {
10  
        callF(action, row);
11  
      }
12  
    });
13  
  }
14  
  ret table;
15  
}

Author comment

Began life as a copy of #1015848

download  show line numbers  debug dex   

Travelled to 8 computer(s): cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tvejysmllsmz

No comments. add comment

Snippet ID: #1019046
Snippet name: tablePopupMenuItemsThreaded_top - adds to the menu if it already exists, runs actions in new thread with messagebox on error
Eternal ID of this version: #1019046/5
Text MD5: c83462e9477d06b857883d9e3bd86955
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-14 16:37:25
Source code size: 469 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 137 / 155
Version history: 4 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1019046 & http://1019046.tinybrain.de