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)

// action: voidfunc(int row)
static JTable tablePopupMenuItemsThreaded(final JTable table, O... params) {
  for (int i = 0; i+1 < l(params); i += 2) {
    fO action = params[i+1];
    fO threadInfo = _threadInfo();
    tablePopupMenuItem(table, str(params[i]), voidfunc(final int row) {
      _threadInheritInfo(threadInfo);
      thread-messagebox {
        callF(action, row);
      }
    });
  }
  ret table;
}

Author comment

Began life as a copy of #1015826

download  show line numbers  debug dex   

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

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: 218 / 245
Version history: 8 change(s)
Referenced in: [show references]

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