1 | // action: voidfunc(S item) |
2 | static JList listPopupMenuItemsThreaded(final JList list, O... params) { |
3 | for (int i = 0; i+1 < l(params); i += 2) { |
4 | if (isMenuSeparatorIndicator(params[i])) continue with --i; |
5 | fO action = params[i+1]; |
6 | listPopupMenuItem(list, str(params[i]), voidfunc(fS item) { |
7 | thread-messagebox { |
8 | callF(action, item); |
9 | } |
10 | }); |
11 | } |
12 | ret list; |
13 | } |
Began life as a copy of #1009959
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: | #1015826 |
Snippet name: | listPopupMenuItemsThreaded - adds to the menu if it already exists, runs actions in new thread with messagebox on error |
Eternal ID of this version: | #1015826/7 |
Text MD5: | de3cf2a293bdb4dd1e8b24213d4b6d85 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-08 16:58:51 |
Source code size: | 403 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 449 / 482 |
Version history: | 6 change(s) |
Referenced in: | [show references] |