Libraryless. Click here for Pure Java version (14413L/99K).
1 | !7 |
2 | |
3 | sclass WatchFieldOfModule extends DynSCP { |
4 | S moduleID, field; |
5 | |
6 | transient O value; |
7 | |
8 | JComponent visualize2() { |
9 | if (field == null || moduleID == null) |
10 | ret jcenteredlabel("Need parameters"); |
11 | ret jSection(field + " of " + moduleID, jlabel(str(value))); |
12 | } |
13 | |
14 | void start { |
15 | ownTimer(doEveryAndNow(2000, r updateMe)); |
16 | } |
17 | |
18 | void update { |
19 | O o; |
20 | try { |
21 | o = getOpt(dm_getModule(moduleID), field); |
22 | } catch e { |
23 | o = exceptionToStringShort(e); |
24 | } |
25 | if (o != value) { |
26 | value = o; |
27 | revisualize2(); |
28 | } |
29 | } |
30 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1016129 |
Snippet name: | Watch Field Of Module [Dyn Module] |
Eternal ID of this version: | #1016129/5 |
Text MD5: | aaf5998a4e3c2ed2abfc7f2a8e6b0f74 |
Transpilation MD5: | 7bc1dd2d5d2b46c9251918d757a4174e |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-06-08 18:40:17 |
Source code size: | 596 bytes / 30 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 447 / 1034 |
Version history: | 4 change(s) |
Referenced in: | [show references] |