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

15
LINES

< > BotCompany Repo | #1014794 // selectSnippetID_v1 (just a text field, good for loading images), now uses r-thread for onSelect

JavaX fragment (include)

1  
static JComponent selectSnippetID_v1(final VF1<S> onSelect) {
2  
  ret selectSnippetID_v1("#", onSelect);
3  
}
4  
5  
static JComponent selectSnippetID_v1(S defaultID, final VF1<S> onSelect) {
6  
  final JTextField tfSnippetID = jtextfield(defaultID);
7  
  if (eq(defaultID, "#")) moveCaretToEnd(tfSnippetID);
8  
  
9  
  JComponent panel;
10  
  renameSubmitButton(panel = showTitledForm("Select Snippet",
11  
    "Snippet ID:", tfSnippetID, r-thread {
12  
      callF(onSelect, fsI(getTextTrim(tfSnippetID)));
13  
    }), "Select snippet");
14  
  ret panel;
15  
}

Author comment

Began life as a copy of #1014779

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: #1014794
Snippet name: selectSnippetID_v1 (just a text field, good for loading images), now uses r-thread for onSelect
Eternal ID of this version: #1014794/12
Text MD5: 5ee5cd68df101fa974630ae48a52e933
Author: stefan
Category: javax / chat
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-07 15:42:55
Source code size: 529 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 354 / 389
Version history: 11 change(s)
Referenced in: [show references]