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

15
LINES

< > BotCompany Repo | #1021467 // dm_gazelle_newRuleDialog

JavaX fragment (include)

1  
svoid dm_gazelle_newRuleDialog(S in) {
2  
  dm_gazelle_newRuleDialog(in, in);
3  
}
4  
5  
svoid dm_gazelle_newRuleDialog(S in, S out) {
6  
  final JTextField tf1 = jtextfield(in);
7  
  final JTextField tf2 = jtextfield(out);
8  
  showFormTitled("Make a rule",
9  
    "When", tf1,
10  
    "Then", tf2,
11  
    r {
12  
      Pair<S, Bool> p = dm_gazelle_addRule(gtt(tf1), gtt(tf2));
13  
      infoBox(p.b ? "Rule " + p.a + " added" : "Rule already there: " + p.a);
14  
    });
15  
}

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: #1021467
Snippet name: dm_gazelle_newRuleDialog
Eternal ID of this version: #1021467/3
Text MD5: 0bb656590c112f8f46dee651a6446a93
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-14 22:34:17
Source code size: 446 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 276 / 319
Version history: 2 change(s)
Referenced in: [show references]