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

29
LINES

< > BotCompany Repo | #1022584 // Stefan's Assistant: Offer to add new snippet as standard function [old, now integrated in assistant]

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

Uses 911K of libraries. Click here for Pure Java version (11219L/64K).

1  
!7
2  
3  
svoid _onLoad {
4  
  onTranspilerDirty(r dm_refreshTranspiler);
5  
}
6  
7  
cmodule NewSnippetAsSF > DynPrintLogAndEnabled {
8  
  start {
9  
    dm_onSnippetCreated(voidfunc(S snippetID) {
10  
      print("New snippet! " + snippetID);
11  
      if (getSnippetType(snippetID) == snippetType_JavaXInclude()) {
12  
        S text = loadSnippet(snippetID);
13  
        S sfName = first(findFunctionDefinitions(text));
14  
        if (sfName != null)
15  
          showPackedFrameInBottomRightCorner(
16  
            centerAndSouthWithMargins(jlabel("Add standard function: "
17  
              + sfName + "?"),
18  
              hgridWithSpacing(
19  
                jThreadedButton("OK", r {
20  
                  disposeWindow(heldInstance(JButton));
21  
                  addStandardFunctionWithAnimation(snippetID);
22  
                }),
23  
                jCancelButton("No")
24  
              )
25  
          ));
26  
      }
27  
    });
28  
  }
29  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1022584
Snippet name: Stefan's Assistant: Offer to add new snippet as standard function [old, now integrated in assistant]
Eternal ID of this version: #1022584/6
Text MD5: afd6ed56f4731f3165f3e879ae6a9663
Transpilation MD5: c973b5595b6fdcca5f0f5149aa34244d
Author: stefan
Category: javax
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-05-16 16:57:10
Source code size: 888 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 283 / 1457
Version history: 5 change(s)
Referenced in: [show references]