Download presentation
Presentation is loading. Please wait.
Published byMildred Brown Modified over 9 years ago
1
Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC 1 Introduction to Natural Dialogs Natural Conference 2005 Ralph Zbrog RGZbrog@ZZUtils.com
2
2 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Excerpts from a 2-day seminar: Introduction to Natural/Adabas for Windows. See www.ZZUtils.com/train.html for more information.www.ZZUtils.com/train.html
3
3 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Overview System Object Handler Created a program to summarize Object Handler output Parses Object Handler report Emulates SYSTRANS summary Created a dialog
4
4 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog Components Graphic controls Input fields, push buttons, list boxes,... Attributes Color, font, position,... AcitveX properties Events Click, enter, leave,... PROCESS GUI statement ACTION ActiveX methods In-line subroutines Data definitions
5
5 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC ActiveX Controls Natural allows use of 3 rd -party controls Chad Scott C.Scott@fcl.ca ActiveX/Automation from Natural Peter Schornboeck P.Schornboeck@chello.at ServLine: SAG IUG 2004 SftTree OCX – www.softelvdm.com
6
6 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog Wizard Templates Selection dialog Frame dialog Extended frame dialog Tab dialog
7
7 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Definitions Control: generic term for GUI component or ActiveX control Lists: Bullets: apply all Numbers: select one Linked variable: means of passing data between controls Change value Refresh links
8
8 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Sample Report
9
9 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Sample Report
10
10 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Create a Dialog 1.Toolbar icon: New Dialog 2.Menu: Object New Dialog 3.Menu: Object New Dialog Wizard...
11
11 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog Attributes 1.Double-click within dialog edit area 2.Context menu: Attributes... 3.Menu: Dialog Attributes...
12
12 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog Attributes String: dialog title Constant: Object Handler Statistics Centered position No control clipping No docking Dynamic info line Non-maximizable Non-minimizable
13
13 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog Attributes Click OK
14
14 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Insert an Input Field 1.Dialog toolbar icon: 2.Menu: Insert Input Field Click-and-drag cursor to specify position and size
15
15 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Input Field Attributes 1.Double-click control 2.Context menu: Attributes... 3.Menu: Control Attributes...
16
16 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Input Field Attributes String: click the selection button
17
17 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Input Field Source Definition Specify a field name for the source value Define the source field as a linked variable
18
18 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Input Field Attributes Dynamic Information Line (DIL) text constant Constant: Required: full path Mandatory field
19
19 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Insert a Browse Push Button 1.Dialog toolbar icon: 2.Menu: Insert Push Button Click-and-drag cursor to specify position and size
20
20 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC 1.Double-click control 2.Context menu: Attributes... 3.Menu: Control Attributes... Browse Push Button Attributes
21
21 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Browse Push Button Attributes String: button label Constant: Browse...
22
22 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Browse Push Button Events 1.Context menu: Event Handlers... 2.Menu: Control Event Handlers...
23
23 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Browse Click Event Add logic for Click event
24
24 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Browse Click Event Initialize Input Field
25
25 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Browse Click Event Initialize Input Field – check return code
26
26 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Browse Click Event Transfer selection field value to Input Field via linked variable
27
27 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Align Controls Click-and-drag cursor around both controls
28
28 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Align Controls 1.Ctl-Alt-UpArrow 2.Context menu: Align Position Top 3.Menu: Control Align Position Top
29
29 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Insert a Text Constant Click-and-drag cursor to specify position and size 1.Dialog toolbar icon: Text Constant 2.Menu: Insert Text Constant
30
30 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Text Constant Attributes 1.Double-click control 2.Context menu: Attributes... 3.Menu: Control Attributes...
31
31 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Text Constant Attributes String: text Constant: Object Handler Report
32
32 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Text Constant Attributes Click OK
33
33 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Modify Text Constant Stretch Text Constant to view entire string 1.Click-and-drag one of the sizing handles 2.Context menu: Stretch East 3.Menu: Control Stretch East
34
34 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Insert an Exit Push Button 1.Dialog toolbar icon: 2.Menu: Insert Push Button Click-and-drag cursor to specify position and size
35
35 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC 1.Double-click control 2.Context menu: Attributes... 3.Menu: Control Attributes... Exit Push Button Attributes
36
36 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Exit Push Button Attributes String: button label Constant: Exit Style: Cancel Button
37
37 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Exit Push Button Events 1.Context menu: Event Handlers... 2.Menu: Control Event Handlers...
38
38 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Exit Click Event Add logic for Click event
39
39 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC 1.Dialog toolbar icon: 2.Menu: Insert Push Button Insert an OK Push Button Click-and-drag cursor to specify position and size
40
40 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC 1.Double-click control 2.Context menu: Attributes... 3.Menu: Control Attributes... OK Push Button Attributes
41
41 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Push Button Attributes String: button label Constant: Stats Style: OK Button
42
42 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Unify Push Buttons Click-and-drag cursor around both controls
43
43 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC 1.Unify size Menu: Control Unify Size Width Menu: Control Unify Size Height Unify Push Buttons Force same width and height 2.Unify height Context menu: Unify Size Width Context menu: Unify Size Height
44
44 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Select Stats push button 1.Context menu: Event Handlers... 2.Menu: Control Event Handlers... OK Push Button Events
45
45 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Click Event Code to test for selection value Add logic for Click event Editor: open larger edit window OK: close Push Button event handler window
46
46 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Click Event Populate list box
47
47 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Click Event ASSIGN #RPT = #IF-1.STRING IF #RPT = ' ' THEN PROCESS GUI ACTION MESSAGE-BOX WITH #DLG$WINDOW 'Specify a report name' 'Input Error' 'SO1' GIVING #RC ESCAPE ROUTINE END-IF /* Search help text for “PROCESS GUI ACTION”
48
48 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Click Event RESET #CNT READ WORK 1 #REC BEFORE BREAK PROCESSING IF #REC.#OBJ = 'Shared Resource Name' THEN ASSIGN #RESOURCE = TRUE END-IF IF #REC.#LIB = ' ' THEN RESET #RESOURCE END-IF IF #REC.#LIB = ' ' OR = '--------' OR = 'Library ' OR = 'Function' OR = 'Adabas e' OR = 'Processi' OR = 'Error de' THEN ESCAPE TOP END-IF END-BEFORE
49
49 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Click Event AT BREAK OF #REC.#OBJ ASSIGN #OLD = OLD (#REC.#TYP) EXAMINE #NTYP (*) FOR #OLD GIVING INDEX #I EXAMINE #OTYP (*) FOR #OLD GIVING INDEX #J ASSIGN #OLD = OLD (#REC.#MSG) DECIDE FOR FIRST CONDITION WHEN #RESOURCE ADD 1 TO #CNT.#OTH (6) WHEN #I <> 0 ADD 1 TO #CNT.#NAT (#I) WHEN #J <> 0 ADD 1 TO #CNT.#OTH (#J) WHEN #OLD = 'User error message' ADD 1 TO #CNT.#OTH (5) WHEN NONE IGNORE END-DECIDE END-BREAK AT BREAK OF #REC.#LIB ADD 1 TO #CNT.#LIB END-BREAK END-WORK
50
50 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Click Event ASSIGN #CNT.#NALL = #CNT.#NAT (*) + 0 ASSIGN #CNT.#OALL = #CNT.#OTH (*) + 0 ASSIGN #CNT.#TOT = #CNT.#NALL + #CNT.#OALL /* PROCESS GUI ACTION DELETE-CHILDREN WITH #LB-1 GIVING #RC FOR #I = 1 #N-MAX MOVE EDITED #CNT.#NAT (#I) (EM=ZZZ,ZZZ) TO #EDIT COMPRESS FULL #NDESC (#I) #EDIT INTO #STRING (#I) END-FOR
51
51 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Click Event PROCESS GUI ACTION ADD-ITEMS WITH #LB-1 2 'NATURAL OBJECTS' ' ' GIVING #RC PROCESS GUI ACTION ADD-ITEMS WITH #LB-1 #N-MAX #STRING (*) GIVING #RC
52
52 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Click Event FOR #I = 1 #O-MAX MOVE EDITED #CNT.#OTH (#I) (EM=ZZZ,ZZZ) TO #EDIT COMPRESS FULL #ODESC (#I) #EDIT INTO #STRING (#I) END-FOR PROCESS GUI ACTION ADD-ITEMS WITH #LB-1 4 ' ' 'OTHER OBJECTS' ' ' GIVING #RC PROCESS GUI ACTION ADD-ITEMS WITH #LB-1 #O-MAX #STRING (*) GIVING #RC
53
53 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Click Event MOVE EDITED #CNT.#LIB (EM=ZZZ,ZZZ) TO #EDIT COMPRESS FULL #TOTAL (1) #EDIT INTO #STRING (1) MOVE EDITED #CNT.#NALL (EM=ZZZ,ZZZ) TO #EDIT COMPRESS FULL #TOTAL (2) #EDIT INTO #STRING (2) MOVE EDITED #CNT.#OALL (EM=ZZZ,ZZZ) TO #EDIT COMPRESS FULL #TOTAL (3) #EDIT INTO #STRING (3) MOVE EDITED #CNT.#TOT (EM=ZZZ,ZZZ) TO #EDIT COMPRESS FULL #TOTAL (4) #EDIT INTO #STRING (4)
54
54 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Click Event PROCESS GUI ACTION ADD-ITEMS WITH #LB-1 4 ' ' 'TOTAL OBJECTS' ' ' GIVING #RC PROCESS GUI ACTION ADD-ITEMS WITH #LB-1 #T-MAX #STRING (*) GIVING #RC
55
55 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC 1.Context menu: Local Data Area... 2.Menu: Dialog Local Data Area... OK Push Button Local Data Area
56
56 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Push Button Local Data Area Click OK to return to dialog editor Check the dialog: 1.Toolbar icon: 2.Ctrl-e 3.Menu: Object Check
57
57 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Push Button Local Data Area 1 #RPT (A120) 1 #REC (A145) 1 REDEFINE #REC 2 #LIB (A8) 2 FILLER 1X 2 #OBJ (A32) 2 FILLER 1X 2 #TYP (A11) 2 FILLER 1X 2 #SO (A6) 2 #msg (a20) /* 1 #N-MAX (I4) CONST 1 #O-MAX (I4) CONST 1 #t-max (i4) const
58
58 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Push Button Local Data Area 1 #natural (A37/#N-MAX) INIT <'Global ' - 'Global Data Areas','Local ' - 'Local Data Areas','Parameter ' - 'Parameter Data Areas','Program ' - 'Programs','Subprogram ' - 'Subprograms','Subroutine ' - 'Subroutines','Helproutine ' - 'Helproutines','Copycode ' - 'Copycodes','Text ' - 'Texts','Dialog ' - 'Dialogs','Map ' - 'Maps','Class ' - 'Classes' > 1 REDEFINE #natural 2 #ENTRY (#N-MAX) 3 #NTYP (A12) 3 #NDESC (A25)
59
59 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Push Button Local Data Area 1 #other (A37/#O-MAX) INIT <'Command ' - 'Command Processors','Rule ' - 'PREDICT Processing Rules','DDM ' - 'DDMs','Adabas FDT ' - 'ADABAS FDTs','Error ' - 'Error Message Texts','Resources ' - 'Resources' > 1 REDEFINE #other 2 #ENTRY (#O-MAX) 3 #OTYP (A12) 3 #ODESC (A25) 1 #total (A25/#t-MAX) INIT <'Libraries','Natural Objects','Other Objects','All Objects' > /*
60
60 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC OK Push Button Local Data Area 1 #CNT 2 #LIB (I4) 2 #NAT (n5/#N-MAX) 2 #OTH (n5/#O-MAX) 2 #NALL (I4) 2 #OALL (I4) 2 #TOT (I4) 1 #EDIT (A7) 1 #string (a40/#n-max) /* 1 #PROGRAM (A8) INIT /* 1 #I (I4) 1 #j (I4) 1 #RC (I4) 1 #resource (l) 1 #old (a20)
61
61 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Check the Dialog List Source: list entire dialog Edit: close error window
62
62 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Check the Dialog Error message indicating missing list box
63
63 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC 1.Dialog toolbar icon: 2.Menu: Insert Group Frame Insert a Group Frame Click-and-drag cursor around all five controls 1.Double-click control 2.Context menu: Attributes... 3.Menu: Control Attributes...
64
64 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Group Frame Attributes String: group name Constant: Selection
65
65 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Click-and-drag dialog corner or horizontal border Modify Dialog Window Stretch dialog vertically to make room for a list box
66
66 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Insert a List Box Click-and-drag cursor to specify position and size 1.Dialog toolbar icon: 2.Menu: Insert List Box 1.Double-click control 2.Context menu: Attributes... 3.Menu: Control Attributes...
67
67 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC List Box Attributes Click Font selection icon
68
68 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC List Box Attributes Select a fixed font
69
69 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC List Box Attributes No 3-D border (personal preference)
70
70 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Test the Dialog Save Check Run
71
71 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Test the Dialog
72
72 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog Events Menu: Dialog Event Handlers...
73
73 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog Events Select AFTER-OPEN
74
74 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog AFTER-OPEN Event Logic to populate List Box Editor: open larger edit window OK: close dialog event handler window
75
75 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog AFTER-OPEN Event Remainder of logic to populate List Box Click Close icon
76
76 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog AFTER-OPEN Event PROCESS GUI ACTION ADD-ITEMS WITH #LB-1 2 'NATURAL OBJECTS' ' ' GIVING #RC PROCESS GUI ACTION ADD-ITEMS WITH #LB-1 #N-MAX #NDESC (*) GIVING #RC
77
77 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog AFTER-OPEN Event /* PROCESS GUI ACTION ADD-ITEMS WITH #LB-1 4 ' ' 'OTHER OBJECTS' ' ' GIVING #RC PROCESS GUI ACTION ADD-ITEMS WITH #LB-1 #O-MAX #ODESC (*) GIVING #RC
78
78 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog AFTER-OPEN Event /* PROCESS GUI ACTION ADD-ITEMS WITH #LB-1 4 ' ' 'TOTAL OBJECTS' ' ' GIVING #RC PROCESS GUI ACTION ADD-ITEMS WITH #LB-1 #T-MAX #TOTAL (*) GIVING #RC
79
79 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog AFTER-OPEN Event Click Yes to keep source changes
80
80 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog Events “*” denotes presence of custom code
81
81 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Test the Dialog Save Check Run
82
82 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Test the Dialog Click Browse...
83
83 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Test the Dialog Select a txt file to populate the dialog’s input field
84
84 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Test the Dialog Click Stats
85
85 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Test the Dialog As a finishing touch, add a group frame around the list box
86
86 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC 1.Dialog toolbar icon: 2.Menu: Insert Group Frame Insert a Group Frame Click-and-drag cursor around the list box 1.Double-click control 2.Context menu: Attributes... 3.Menu: Control Attributes...
87
87 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Group Frame Attributes String: frame label Constant: Object Counts
88
88 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Save Run Verify the Dialog
89
89 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Verify the Dialog
90
90 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog Attributes Disallow window resizing 1.Double-click within dialog edit area 2.Context menu: Attributes... 3.Menu: Dialog Attributes...
91
91 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Dialog Attributes Not size modifiable
92
92 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Stow Execute Completed Dialog
93
93 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Completed Dialog
94
94 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Alternate Dialog Design List Box Edit Area Input Fields
95
95 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Download www.ZZUtils.com/soh.zip
96
96 Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC Fin
97
Introduction to Natural Dialogs © 2005 LEN C ONSULTING LLC 97 Introduction to Natural Dialogs Natural Conference 2005 Ralph Zbrog RGZbrog@ZZUtils.com
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.