1
|
// Demonstrates the issue Frame.getNextEnabledWidget problem.
|
2
|
|
3
|
DEFINE FRAME outerFrame
|
4
|
WITH SIZE 80 BY 15
|
5
|
AT COL 1 ROW 1.
|
6
|
|
7
|
DEFINE BUTTON focusable1.
|
8
|
DEFINE BUTTON focusable2.
|
9
|
DEFINE FRAME innerFrame
|
10
|
focusable1 focusable2
|
11
|
WITH SIZE 60 BY 2
|
12
|
AT ROW 1 COL 1.
|
13
|
FRAME innerFrame:FRAME = FRAME outerFrame:HANDLE.
|
14
|
|
15
|
DEFINE BUTTON focusable3.
|
16
|
DEFINE BUTTON focusable8.
|
17
|
DEFINE FRAME innerFrame2
|
18
|
focusable3 focusable8
|
19
|
WITH SIZE 60 BY 10
|
20
|
AT COLUMN 1 ROW 5.
|
21
|
FRAME innerFrame2:FRAME = FRAME outerFrame:HANDLE.
|
22
|
|
23
|
DEFINE BUTTON focusable5.
|
24
|
DEFINE FRAME innermostFrame
|
25
|
focusable5
|
26
|
WITH SIZE 50 BY 4
|
27
|
AT COLUMN 1 ROW 6.
|
28
|
FRAME innermostFrame:FRAME = FRAME innerFrame2:HANDLE.
|
29
|
|
30
|
DEFINE BUTTON focusable7.
|
31
|
DEFINE FRAME innerInnerMostFrame
|
32
|
focusable7
|
33
|
WITH SIZE 40 BY 2
|
34
|
AT COLUMN 1 ROW 2.5.
|
35
|
FRAME innerInnerMostFrame:FRAME = FRAME innermostFrame:HANDLE.
|
36
|
|
37
|
DEFINE FRAME noFocusableFrame
|
38
|
WITH SIZE 10 BY 1
|
39
|
AT COLUMN 30 ROW 1.
|
40
|
FRAME noFocusableFrame:FRAME = FRAME innerInnerMostFrame:HANDLE.
|
41
|
|
42
|
{functions.i}
|
43
|
|
44
|
{printEntryLeave.i &widget="FRAME outerFrame"}
|
45
|
{printEntryLeave.i &widget="FRAME innerFrame"}
|
46
|
{printEntryLeave.i &widget="FRAME innerFrame2"}
|
47
|
{printEntryLeave.i &widget="FRAME innermostFrame"}
|
48
|
{printEntryLeave.i &widget="FRAME innerInnerMostFrame"}
|
49
|
{printEntryLeave.i &widget="FRAME noFocusableFrame"}
|
50
|
{printEntryLeave.i &widget="focusable1"}
|
51
|
{printEntryLeave.i &widget="focusable2"}
|
52
|
{printEntryLeave.i &widget="focusable3"}
|
53
|
{printEntryLeave.i &widget="focusable5"}
|
54
|
{printEntryLeave.i &widget="focusable7"}
|
55
|
{printEntryLeave.i &widget="focusable8"}
|
56
|
|
57
|
ON ENTRY OF focusable2 DO:
|
58
|
RUN PrintEntry(focusable2:HANDLE).
|
59
|
RETURN NO-APPLY.
|
60
|
END.
|
61
|
ON ENTRY OF focusable5 DO:
|
62
|
RUN PrintEntry(focusable5:HANDLE).
|
63
|
RETURN NO-APPLY.
|
64
|
END.
|
65
|
|
66
|
ENABLE ALL WITH FRAME outerFrame.
|
67
|
|
68
|
ENABLE focusable2 WITH FRAME innerFrame.
|
69
|
ENABLE ALL WITH FRAME innermostFrame.
|
70
|
ENABLE focusable7 WITH FRAME innerInnerMostFrame.
|
71
|
ENABLE focusable3 focusable8 WITH FRAME innerFrame2.
|
72
|
|
73
|
ENABLE ALL WITH FRAME innermostFrame2.
|
74
|
ENABLE ALL WITH FRAME outerFrame2.
|
75
|
|
76
|
WAIT-FOR GO OF FRAME outerFrame.
|
77
|
|