SHOW:
|
|
- or go back to the newest paste.
1 | - | ! There is an apparent problem where click on a row on a list, is interpretted as a click on an obsucred field under the row. |
1 | + | ! There is an apparent problem where click on a row on a list, is interpretted as a click on an obsucred field under the row. |
2 | - | ! This proof of concept shows that DISABLING the control under the list, solves that problem |
2 | + | ! This proof of concept shows that DISABLING the control under the list, solves that problem |
3 | - | ! Some extra complexity was added to correct tabbing around |
3 | + | ! Some extra complexity was added to correct tabbing around |
4 | - | ! for some reason the EVENT:Selecting and EVENT:Selected are showing FIELD()=0 when MyListFEQ exists. |
4 | + | ! for some reason the EVENT:Selecting and EVENT:Selected are showing FIELD()=0 when MyListFEQ exists. |
5 | - | |
5 | + | |
6 | - | PROGRAM |
6 | + | PROGRAM |
7 | - | |
7 | + | |
8 | - | MAP |
8 | + | MAP |
9 | - | END |
9 | + | END |
10 | - | |
10 | + | |
11 | - | INCLUDE('equates.clw'),once |
11 | + | INCLUDE('equates.clw'),once |
12 | - | INCLUDE('keycodes.clw'),once |
12 | + | INCLUDE('keycodes.clw'),once |
13 | - | |
13 | + | |
14 | - | Entry1 STRING(20) |
14 | + | Entry1 STRING(20) |
15 | - | Entry2 STRING(20) |
15 | + | Entry2 STRING(20) |
16 | - | Entry3 STRING(20) |
16 | + | Entry3 STRING(20) |
17 | - | |
17 | + | |
18 | - | Window WINDOW('List Over Entries'),AT(,,157,164),GRAY,FONT('Segoe UI',8),AUTO |
18 | + | Window WINDOW('List Over Entries'),AT(,,157,164),GRAY,FONT('Segoe UI',8),AUTO |
19 | - | PROMPT('Prompt1'),AT(19,26),USE(?PROMPT1) |
19 | + | PROMPT('Prompt1'),AT(19,26),USE(?PROMPT1) |
20 | - | ENTRY(@s20),AT(55,26),USE(ENTRY1) |
20 | + | ENTRY(@s20),AT(55,26),USE(ENTRY1) |
21 | - | |
21 | + | |
22 | - | PROMPT('Prompt2'),AT(19,57),USE(?PROMPT2) |
22 | + | PROMPT('Prompt2'),AT(19,57),USE(?PROMPT2) |
23 | - | ENTRY(@s20),AT(55,57),USE(ENTRY2) |
23 | + | ENTRY(@s20),AT(55,57),USE(ENTRY2) |
24 | - | |
24 | + | |
25 | - | PROMPT('Prompt3'),AT(19,86),USE(?PROMPT3) |
25 | + | PROMPT('Prompt3'),AT(19,86),USE(?PROMPT3) |
26 | - | ENTRY(@s20),AT(55,86),USE(ENTRY3) |
26 | + | ENTRY(@s20),AT(55,86),USE(ENTRY3) |
27 | - | |
27 | + | |
28 | - | BUTTON('&Cancel'),AT(106,136,42,14),STD(STD:Close) |
28 | + | BUTTON('&Cancel'),AT(106,136,42,14),STD(STD:Close) |
29 | END | |
30 | - | |
30 | + | |
31 | - | MyListQ QUEUE |
31 | + | MyListQ QUEUE |
32 | - | Word STRING(10) |
32 | + | Word STRING(10) |
33 | - | END |
33 | + | END |
34 | - | MyListFEQ UNSIGNED |
34 | + | MyListFEQ UNSIGNED |
35 | - | MyRegionFEQ UNSIGNED |
35 | + | MyRegionFEQ UNSIGNED |
36 | - | |
36 | + | |
37 | - | INCLUDE('DEBUGER.INC'),ONCE |
37 | + | INCLUDE('DEBUGER.INC'),ONCE |
38 | - | DBG debuger |
38 | + | DBG debuger |
39 | - | |
39 | + | |
40 | - | CODE |
40 | + | CODE |
41 | - | dbg.mg_init('ListOverEntries') |
41 | + | dbg.mg_init('ListOverEntries') |
42 | - | Entry1 = 'Hello' |
42 | + | Entry1 = 'Hello' |
43 | - | Entry2 = 'There' |
43 | + | Entry2 = 'There' |
44 | - | Entry3 = 'Clarionites' |
44 | + | Entry3 = 'Clarionites' |
45 | - | |
45 | + | |
46 | - | OPEN(Window) |
46 | + | OPEN(Window) |
47 | - | ACCEPT |
47 | + | ACCEPT |
48 | - | dbg.PrintEvent('Field()['& Field() &']`') |
48 | + | dbg.PrintEvent('Field()['& Field() &']`') |
49 | - | CASE EVENT() |
49 | + | CASE EVENT() |
50 | - | OF EVENT:Selecting |
50 | + | OF EVENT:Selecting |
51 | - | CASE FIELD() |
51 | + | CASE FIELD() |
52 | - | OF ?Entry2 ; DO CreateMyList |
52 | + | OF ?Entry2 ; DO CreateMyList |
53 | - | OF 0 ; IF MyListFEQ |
53 | + | OF 0 ; IF MyListFEQ |
54 | - | DO DestroyMyList |
54 | + | DO DestroyMyList |
55 | - | SELECT(?Entry3) |
55 | + | SELECT(?Entry3) |
56 | - | END |
56 | + | END |
57 | - | OF MyListFEQ ; |
57 | + | OF MyListFEQ ; |
58 | - | ELSE ; DO DestroyMyList |
58 | + | ELSE ; DO DestroyMyList |
59 | - | END |
59 | + | END |
60 | - | OF EVENT:AlertKey ; DO Handle:AlertKey |
60 | + | OF EVENT:AlertKey ; DO Handle:AlertKey |
61 | - | END |
61 | + | END |
62 | - | END |
62 | + | END |
63 | - | |
63 | + | |
64 | - | Handle:AlertKey ROUTINE |
64 | + | Handle:AlertKey ROUTINE |
65 | - | CASE KEYCODE() |
65 | + | CASE KEYCODE() |
66 | - | OF MouseLeft2 |
66 | + | OF MouseLeft2 |
67 | - | IF MyListFEQ <> 0 AND Field()=MyListFEQ |
67 | + | IF MyListFEQ <> 0 AND Field()=MyListFEQ |
68 | - | dbg.Debugout('PROPList:MouseDownRow['& MyListFEQ{PROPList:MouseDownRow} &'] CHOICE(MyLIstFEQ)['& CHOICE(MyListFEQ) &']') |
68 | + | dbg.Debugout('PROPList:MouseDownRow['& MyListFEQ{PROPList:MouseDownRow} &'] CHOICE(MyLIstFEQ)['& CHOICE(MyListFEQ) &']') |
69 | - | GET(MyListQ, MyListFEQ{PROPList:MouseDownRow} + 0) |
69 | + | GET(MyListQ, MyListFEQ{PROPList:MouseDownRow} + 0) |
70 | - | Entry2 = CLIP(Entry2) & ' ' & MyListQ.Word |
70 | + | Entry2 = CLIP(Entry2) & ' ' & MyListQ.Word |
71 | - | END |
71 | + | END |
72 | - | END |
72 | + | END |
73 | - | |
73 | + | |
74 | - | CreateMyList ROUTINE |
74 | + | CreateMyList ROUTINE |
75 | - | IF MyListFEQ <> 0 THEN EXIT END |
75 | + | IF MyListFEQ <> 0 THEN EXIT END |
76 | - | IF RECORDS(MyListQ) = 0 |
76 | + | IF RECORDS(MyListQ) = 0 |
77 | - | DO Fill:MyListQ |
77 | + | DO Fill:MyListQ |
78 | - | END |
78 | + | END |
79 | - | |
79 | + | |
80 | - | ! MyRegionFEQ = CREATE(0, CREATE:region) |
80 | + | ! MyRegionFEQ = CREATE(0, CREATE:region) |
81 | - | ! SETPOSITION( MyRegionFEQ, ?Entry2{PROP:XPOS}, 70, ?Entry2{PROP:Width}, 40 ) |
81 | + | ! SETPOSITION( MyRegionFEQ, ?Entry2{PROP:XPOS}, 70, ?Entry2{PROP:Width}, 40 ) |
82 | - | ! MyRegionFEQ{PROP:Hide} = FALSE |
82 | + | ! MyRegionFEQ{PROP:Hide} = FALSE |
83 | - | |
83 | + | |
84 | - | MyListFEQ = CREATE( 0, CREATE:list) |
84 | + | MyListFEQ = CREATE( 0, CREATE:list) |
85 | - | SETPOSITION( MyListFEQ , ?Entry2{PROP:XPOS}, 70, ?Entry2{PROP:Width}, 40 ) |
85 | + | SETPOSITION( MyListFEQ , ?Entry2{PROP:XPOS}, 70, ?Entry2{PROP:Width}, 40 ) |
86 | - | MyListFEQ{PROP:From} = MyListQ |
86 | + | MyListFEQ{PROP:From} = MyListQ |
87 | - | MyListFEQ{PROP:Alrt, 255} = MouseLeft2 |
87 | + | MyListFEQ{PROP:Alrt, 255} = MouseLeft2 |
88 | - | !MyListFEQ{PROP:Follows} = ?ENTRY2 ! creates visual bleed through bug |
88 | + | !MyListFEQ{PROP:Follows} = ?ENTRY2 ! creates visual bleed through bug |
89 | - | MyListFEQ{PROP:Skip} = TRUE |
89 | + | MyListFEQ{PROP:Skip} = TRUE |
90 | - | MyListFEQ{PROP:Hide} = FALSE |
90 | + | MyListFEQ{PROP:Hide} = FALSE |
91 | - | |
91 | + | |
92 | - | DISABLE(?Entry3) ! note: this breaks tabbing off of ?Entry2, as it then skips ?Entry3 |
92 | + | DISABLE(?Entry3) ! note: this breaks tabbing off of ?Entry2, as it then skips ?Entry3 |
93 | - | |
93 | + | |
94 | - | |
94 | + | |
95 | - | |
95 | + | |
96 | - | |
96 | + | |
97 | - | Fill:MyListQ ROUTINE |
97 | + | Fill:MyListQ ROUTINE |
98 | - | MyListQ.Word = 'These' ; ADD(MyListQ) |
98 | + | MyListQ.Word = 'These' ; ADD(MyListQ) |
99 | - | MyListQ.Word = 'Are' ; ADD(MyListQ) |
99 | + | MyListQ.Word = 'Are' ; ADD(MyListQ) |
100 | - | MyListQ.Word = 'My' ; ADD(MyListQ) |
100 | + | MyListQ.Word = 'My' ; ADD(MyListQ) |
101 | - | MyListQ.Word = 'Common' ; ADD(MyListQ) |
101 | + | MyListQ.Word = 'Common' ; ADD(MyListQ) |
102 | - | MyListQ.Word = 'Worlds' ; ADD(MyListQ) |
102 | + | MyListQ.Word = 'Worlds' ; ADD(MyListQ) |
103 | - | |
103 | + | |
104 | - | DestroyMyList ROUTINE |
104 | + | DestroyMyList ROUTINE |
105 | - | IF MyListFEQ <> 0 |
105 | + | IF MyListFEQ <> 0 |
106 | - | DESTROY(MyListFEQ ); MyListFEQ = 0 |
106 | + | DESTROY(MyListFEQ ); MyListFEQ = 0 |
107 | - | DESTROY(MyRegionFEQ); MyRegionFEQ = 0 |
107 | + | DESTROY(MyRegionFEQ); MyRegionFEQ = 0 |
108 | - | ENABLE(?Entry3) |
108 | + | ENABLE(?Entry3) |
109 | END |