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

24
LINES

< > BotCompany Repo | #1026339 // DynCopiedObjectTable

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (18634L/133K).

abstract sclass DynCopiedObjectTable<A> extends DynObjectTable<A> {
  S srcModuleLibID;
  transient bool autoScrollDown;
  transient ReliableSingleThread rstGrabData = dm_rst(this, r grabData);
  
  void init {} // override this in subclasses

  start {
    init();
    dm_require(srcModuleLibID);
    dm_vmBus_onMessage listChanged(voidfunc(O mod, L list) {
      if (empty(srcModuleLibID) || dm_isMe(mod) || !eq(dm_moduleLibID(mod), srcModuleLibID)) ret;
      rstGrabData.trigger(); // goes through RST + Q
    });
    rstGrabData.trigger();
  }
  
  void grabData {
    L l = cast dm_callModuleWithLibID(srcModuleLibID, 'getList);
    if (l == null) ret;
    setList(quickImport(l));
    if (autoScrollDown) scrollDown();
  }
}

Author comment

Began life as a copy of #1026333

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026339
Snippet name: DynCopiedObjectTable
Eternal ID of this version: #1026339/4
Text MD5: c2ed848a686a780a488e7037c1b83243
Transpilation MD5: b68f52ba996f5a7edbf64cafbf14ecc1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-12-24 16:42:50
Source code size: 754 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 232 / 593
Version history: 3 change(s)
Referenced in: [show references]