static abstract class DynSingleFunction extends DynModule { transient S buttonText; *() {} *(S *buttonText) {} // call before visualize void setFunctionName(S name) { buttonText = name; } visualize { ret jfullcenter(withMargin(makeButtons())); } JComponent makeButtons() { ret jbutton(or2(buttonText, dm_moduleName()), rThread doItWithEnter); } abstract void doIt(); void doItWithEnter() { temp enter(); try { doIt(); } catch e { print(getStackTrace(e)); } } }
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: | #1016385 |
Snippet name: | DynSingleFunction |
Eternal ID of this version: | #1016385/11 |
Text MD5: | c031690ea56fd5d32be58ea510e49c16 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-10-10 17:43:30 |
Source code size: | 565 bytes / 28 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 484 / 1132 |
Version history: | 10 change(s) |
Referenced in: | #1017609 - DynSingleFunctionWithPrintLog #1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674) |