Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

30
LINES

< > BotCompany Repo | #1016129 // Watch Field Of Module [Dyn Module]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Libraryless. Click here for Pure Java version (14413L/99K).

!7

sclass WatchFieldOfModule extends DynSCP {
  S moduleID, field;
  
  transient O value;

  JComponent visualize2() {
    if (field == null || moduleID == null)
      ret jcenteredlabel("Need parameters");
    ret jSection(field + " of " + moduleID, jlabel(str(value)));
  }
  
  void start {
    ownTimer(doEveryAndNow(2000, r updateMe));
  }
  
  void update {
    O o;
    try {
      o = getOpt(dm_getModule(moduleID), field);
    } catch e {
      o = exceptionToStringShort(e);
    }
    if (o != value) {
      value = o;
      revisualize2();
    }
  }
}

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: 446 / 1032
Version history: 4 change(s)
Referenced in: #1016130 - Show Print Log Of Module [Dyn Module]