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

27
LINES

< > BotCompany Repo | #1015783 // The Intelligent Program v2 [OK, but layout weird]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 6678K of libraries. Click here for Pure Java version (12463L/93K).

1  
!7
2  
3  
static AutoComboBox3 tf;
4  
static DynamicVStack stack;
5  
static ReliableSingleThread rst = new(r go);
6  
sS loaded;
7  
8  
p-subst {
9  
  autoRestart(5);
10  
  showFrame(northAndCenterWithMargins(
11  
    fontSize(15, centerComboBox(tf = standardFunctionComboBox())),
12  
    jscroll_dynamicvstack(stack = dynamicVStack())));
13  
  onChange(tf, rstTrigger(rst));
14  
}
15  
16  
svoid go {
17  
  S s = getTextTrim(tf);
18  
  if (eq(loaded, s)) ret;
19  
  loaded = s;
20  
  stack.clearComponents();
21  
  for (S f : ll(f iPanel_standardFunctionSourceCode, f iPanel_renderSafeFunction, f identifierSafetyEditPanel)) pcall {
22  
    int n = maxNumberOfFunctionArguments(f);
23  
    O[] args = toObjectArray(takeFirst(n, ll(s, r { loaded = null; rst.trigger() })));
24  
    JComponent c = (JComponent) callF(f, args);
25  
    if (c != null) stack.addComponent(jsection(f, c));
26  
  }
27  
}

Author comment

Began life as a copy of #1015738

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: #1015783
Snippet name: The Intelligent Program v2 [OK, but layout weird]
Eternal ID of this version: #1015783/15
Text MD5: eb3bf0d155a5f663da3c24b91bee21bb
Transpilation MD5: e74729dfdf85ce80e20054fb0a4970c1
Author: stefan
Category: javax / gui
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-27 21:15:25
Source code size: 827 bytes / 27 lines
Pitched / IR pitched: No / No
Views / Downloads: 519 / 1140
Version history: 14 change(s)
Referenced in: [show references]