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

20
LINES

< > BotCompany Repo | #1020647 // dm_onSnippetEdited

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

Libraryless. Click here for Pure Java version (14432L/90K).

// r : voidfunc(snippet ID), called in module queue
static AutoCloseable dm_onSnippetEdited(final VF1<S> r) {
  dm_requireSnippetUpdatesModule();
  final DynModule m = dm_current_mandatory();
  ret dm_vmBus_onMessage('snippetUpdate, voidfunc(fL l) {
    switch to m.q();
    S uri = getString(l, 1);
    new Matches m;
    if (swic(uri, "/edit/", m)) {
      S snippetID = fsI(firstIntAsString(m.rest()));
      callF(r, snippetID);
    }
  });
}

static AutoCloseable dm_onSnippetEdited(fS snippetID, final Runnable r) {
  ret dm_onSnippetEdited(voidfunc(S id) {
    if (sameSnippetID(id, snippetID)) callF(r)
  });
}

Author comment

Began life as a copy of #1020439

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020647
Snippet name: dm_onSnippetEdited
Eternal ID of this version: #1020647/3
Text MD5: 0907cd33b29c524688678a0b990eec00
Transpilation MD5: 161900105cfaebbf04e92cf1482bdd55
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-01 18:04:01
Source code size: 637 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 288 / 337
Version history: 2 change(s)
Referenced in: [show references]