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

16
LINES

< > BotCompany Repo | #1021494 // dm_gazelle_newRuleDialog_3

JavaX fragment (include)

svoid dm_gazelle_newRuleDialog_3(S in) {
  dm_gazelle_newRuleDialog_3(in, "");
}

svoid dm_gazelle_newRuleDialog_3(S in, S comments) {
  S out = dropPrefixTrim("+", lastLine(in));
  final JTextArea taRule = typeWriterTextArea(in + "\n=> " + out);
  final JTextArea taComments = typeWriterTextArea(comments);
  showFormTitled2("New Gazelle Rule",
    Rule := taRule,
    Comments := taComments,
    r {
      Pair<S, Bool> p = dm_gazelle_addRuleWithComment(getText(taRule), getText(taComments));
      infoBox(p.b ? "Rule " + p.a + " added" : "Rule already there: " + p.a);
    });
}

Author comment

Began life as a copy of #1021484

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: #1021494
Snippet name: dm_gazelle_newRuleDialog_3
Eternal ID of this version: #1021494/5
Text MD5: 20f947d13c0b0201ad2ffaee8adb3e6b
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-17 15:49:31
Source code size: 597 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 259 / 280
Version history: 4 change(s)
Referenced in: [show references]