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)

// action: voidfunc(int row)
static JTable tablePopupMenuItemsThreaded_top(final JTable table, O... params) {
  params = reverseParams(params);
  for (int i = 0; i+1 < l(params); i += 2) {
    fO action = params[i+1];
    fO threadInfo = _threadInfo();
    tablePopupMenuItem_top(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 #1015848

download  show line numbers  debug dex  old transpilations   

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

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: 405 / 437
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)