Libraryless. Click here for Pure Java version (4948L/33K/113K).
1 | !752 |
2 | |
3 | static JTextField tf1, tf2, tf3, tf4; |
4 | static JLabel lblEntries; |
5 | |
6 | concepts. |
7 | |
8 | concept Quadro { |
9 | S user, system, suggest, feedback; |
10 | } |
11 | |
12 | static Quadro currentQuadro; |
13 | |
14 | p-substance { |
15 | loadAndAutoSaveConcepts(); |
16 | |
17 | showForm( |
18 | "User:", tf1 = new JTextField, |
19 | "System:", tf2 = new JTextField, |
20 | "Suggest:", tf3 = new JTextField, |
21 | "Feedback:", tf4 = new JTextField, |
22 | "Entries in DB:" , lblEntries = jlabel()); |
23 | |
24 | installTimer(lblEntries, 1000, r { |
25 | lblEntries.setText(str(countConcepts(Quadro.class))); |
26 | }); |
27 | |
28 | onEnter(tf1, r { |
29 | currentQuadro = null; |
30 | q().user = tf1.getText(); |
31 | q().system = makeSystemAnswer(q().user); |
32 | tf2.setText(q().system); |
33 | tf4.requestFocus(); |
34 | }); |
35 | |
36 | onEnter(tf3, r { |
37 | q().suggest = tf3.getText(); |
38 | }); |
39 | |
40 | onEnter(tf4, r { |
41 | q().feedback = tf4.getText(); |
42 | }); |
43 | } |
44 | |
45 | static Quadro q() { |
46 | if (currentQuadro == null) |
47 | currentQuadro = new Quadro; |
48 | ret currentQuadro; |
49 | } |
50 | |
51 | static S makeSystemAnswer(S q) { |
52 | ret "woooot"; |
53 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005074 |
Snippet name: | 4 Input Fields [dev.] |
Eternal ID of this version: | #1005074/1 |
Text MD5: | 9b4b666dc264717f925d8d029e70a8fa |
Transpilation MD5: | 378417edd5ffa1da96ecbd1487f599dd |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-10-08 18:51:04 |
Source code size: | 1046 bytes / 53 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 582 / 872 |
Referenced in: | [show references] |