1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Method-Library
4 /*--------------------------------------------------------------------------
5 ------------------------------------------------------------------------*/
9 /* _UIB-CODE-BLOCK-END
*/
13 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
15 /* ******************** Preprocessor Definitions
******************** */
19 /* _UIB-PREPROCESSOR-BLOCK-END
*/
24 /* *********************** Procedure Settings
************************ */
26 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
27 /* Settings for
THIS-PROCEDURE
31 Add Fields to
: Neither
32 Other Settings
: INCLUDE-ONLY
34 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
36 /* ************************* Create Window
************************** */
38 &ANALYZE-SUSPEND _CREATE-WINDOW
39 /* DESIGN Window definition
(used by the UIB
)
40 CREATE WINDOW Method-Library
ASSIGN
43 /* END WINDOW DEFINITION
*/
49 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB Method-Library
50 /* ************************* Included-Libraries
*********************** */
52 {inc
/method
/m-drlvwr.i
}
54 /* _UIB-CODE-BLOCK-END
*/
59 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Method-Library
62 /* *************************** Main Block
*************************** */
64 /* _UIB-CODE-BLOCK-END
*/
68 /* ********************** Internal Procedures
*********************** */
70 &IF DEFINED(EXCLUDE-apply-event) = 0 &THEN
72 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE apply-event Method-Library
73 PROCEDURE apply-event
:
74 /*------------------------------------------------------------------------------
75 Purpose
: Applies an event to all widgets matching the given
76 criteria in the current frame
79 ------------------------------------------------------------------------------*/
80 DEF INPUT PARAMETER event
AS CHAR NO-UNDO.
81 DEF INPUT PARAMETER prefix
AS CHAR NO-UNDO.
82 DEF INPUT PARAMETER type-list
AS CHAR NO-UNDO.
84 DEF VAR enabled
AS LOGI
NO-UNDO.
85 DEF VAR wh
AS HANDLE NO-UNDO.
86 wh
= FRAME {&FRAME-NAME}:CURRENT-ITERATION.
89 DO WHILE VALID-HANDLE( wh
):
91 IF wh
:NAME BEGINS prefix
AND LOOKUP( wh
:TYPE, type-list
) > 0 THEN
93 enabled
= wh
:SENSITIVE.
96 wh
:SENSITIVE = enabled.
105 /* _UIB-CODE-BLOCK-END
*/
110 &IF DEFINED(EXCLUDE-assign-select-combos) = 0 &THEN
112 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE assign-select-combos Method-Library
113 PROCEDURE assign-select-combos
:
114 /*------------------------------------------------------------------------------
115 Purpose
: Assign the values of all select combo boxes
118 ------------------------------------------------------------------------------*/
120 RUN apply-event
( 'U2'
:U
, 'cmb'
, '
COMBO-BOX,SELECTION-LIST'
:U
).
124 /* _UIB-CODE-BLOCK-END
*/
129 &IF DEFINED(EXCLUDE-assign-select-fill-ins) = 0 &THEN
131 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE assign-select-fill-ins Method-Library
132 PROCEDURE assign-select-fill-ins
:
133 /*------------------------------------------------------------------------------
134 Purpose
: Assign the values of all select fill-ins
137 ------------------------------------------------------------------------------*/
139 RUN apply-event
( 'U3'
:U
, 'fil'
, '
FILL-IN'
:U
).
143 /* _UIB-CODE-BLOCK-END
*/
148 &IF DEFINED(EXCLUDE-display-select-combos) = 0 &THEN
150 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE display-select-combos Method-Library
151 PROCEDURE display-select-combos
:
152 /*------------------------------------------------------------------------------
153 Purpose
: Intialise and display all select combos
156 ------------------------------------------------------------------------------*/
158 RUN apply-event
( 'U1'
:U
, 'cmb'
, '
COMBO-BOX,SELECTION-LIST'
:U
).
162 /* _UIB-CODE-BLOCK-END
*/
167 &IF DEFINED(EXCLUDE-display-select-fill-ins) = 0 &THEN
169 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE display-select-fill-ins Method-Library
170 PROCEDURE display-select-fill-ins
:
171 /*------------------------------------------------------------------------------
172 Purpose
: Intialise and display all select fill-ins
175 ------------------------------------------------------------------------------*/
177 RUN apply-event
( 'U1'
:U
, 'fil'
, '
FILL-IN'
:U
).
181 /* _UIB-CODE-BLOCK-END
*/
186 &IF DEFINED(EXCLUDE-local-add-record) = 0 &THEN
188 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-add-record Method-Library
189 PROCEDURE local-add-record
:
190 /*------------------------------------------------------------------------------
191 Purpose
: Override standard ADM method
193 ------------------------------------------------------------------------------*/
195 IF INDEX( THIS-PROCEDURE:INTERNAL-ENTRIES, 'override-add-record'
) > 0 THEN
197 RUN override-add-record
IN THIS-PROCEDURE NO-ERROR.
200 /* Dispatch standard ADM method.
*/
201 RUN dispatch
IN THIS-PROCEDURE ( INPUT 'add-record'
:U
) .
202 RUN inst-add-record
IN THIS-PROCEDURE NO-ERROR.
207 /* _UIB-CODE-BLOCK-END
*/
212 &IF DEFINED(EXCLUDE-local-assign-record) = 0 &THEN
214 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-assign-record Method-Library
215 PROCEDURE local-assign-record
:
216 /*------------------------------------------------------------------------------
217 Purpose
: Override standard ADM method
219 ------------------------------------------------------------------------------*/
221 /* Dispatch standard ADM method.
*/
222 RUN dispatch
IN THIS-PROCEDURE ( INPUT 'assign-record'
:U
) .
223 RUN inst-assign-record
IN THIS-PROCEDURE NO-ERROR.
225 /* Code placed here will execute AFTER standard behavior.
*/
229 /* _UIB-CODE-BLOCK-END
*/
234 &IF DEFINED(EXCLUDE-local-assign-statement) = 0 &THEN
236 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-assign-statement Method-Library
237 PROCEDURE local-assign-statement
:
238 /*------------------------------------------------------------------------------
239 Purpose
: Override standard ADM method
241 ------------------------------------------------------------------------------*/
243 /* Code placed here will execute PRIOR to standard behavior.
*/
244 RUN pre-assign-statement
IN THIS-PROCEDURE NO-ERROR.
245 RUN assign-select-fill-ins.
246 RUN assign-select-combos.
248 /* Dispatch standard ADM method.
*/
249 RUN dispatch
IN THIS-PROCEDURE ( INPUT 'assign-statement'
:U
) .
250 RUN inst-assign-statement
IN THIS-PROCEDURE NO-ERROR.
252 /* Code placed here will execute AFTER standard behavior.
*/
256 /* _UIB-CODE-BLOCK-END
*/
261 &IF DEFINED(EXCLUDE-local-delete-record) = 0 &THEN
263 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-delete-record Method-Library
264 PROCEDURE local-delete-record
:
265 /*------------------------------------------------------------------------------
266 Purpose
: Override standard ADM method
268 ------------------------------------------------------------------------------*/
270 IF INDEX( THIS-PROCEDURE:INTERNAL-ENTRIES, 'override-delete-record'
) > 0 THEN
271 RUN override-delete-record
IN THIS-PROCEDURE NO-ERROR.
273 RUN inst-delete-record
IN THIS-PROCEDURE NO-ERROR.
274 IF RETURN-VALUE = "FAIL":U
THEN RETURN ERROR.
276 /* Dispatch standard ADM method.
*/
277 RUN dispatch
IN THIS-PROCEDURE ( INPUT 'delete-record'
:U
) .
279 /* Code placed here will execute AFTER standard behavior.
*/
280 CLEAR FRAME {&FRAME-NAME} ALL NO-PAUSE.
282 RUN post-delete-record
IN THIS-PROCEDURE NO-ERROR.
287 /* _UIB-CODE-BLOCK-END
*/
292 &IF DEFINED(EXCLUDE-local-destroy) = 0 &THEN
294 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-destroy Method-Library
295 PROCEDURE local-destroy
:
296 /*------------------------------------------------------------------------------
297 Purpose
: Override standard ADM method
299 ------------------------------------------------------------------------------*/
301 /* Code placed here will execute PRIOR to standard behavior.
*/
302 RUN pre-destroy
IN THIS-PROCEDURE NO-ERROR.
304 /* Dispatch standard ADM method.
*/
305 RUN dispatch
IN THIS-PROCEDURE ( INPUT 'destroy'
:U
) .
306 RUN inst-destroy
IN THIS-PROCEDURE NO-ERROR.
307 IF VALID-HANDLE( sys-mgr
) THEN
308 RUN remove-node
IN sys-mgr
( THIS-PROCEDURE ).
310 /* Code placed here will execute AFTER standard behavior.
*/
314 /* _UIB-CODE-BLOCK-END
*/
319 &IF DEFINED(EXCLUDE-local-disable-fields) = 0 &THEN
321 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-disable-fields Method-Library
322 PROCEDURE local-disable-fields
:
323 /*------------------------------------------------------------------------------
324 Purpose
: Override standard ADM method
326 ------------------------------------------------------------------------------*/
328 /* Code placed here will execute PRIOR to standard behavior.
*/
330 /* Dispatch standard ADM method.
*/
331 RUN dispatch
IN THIS-PROCEDURE ( INPUT 'disable-fields'
:U
) .
332 RUN set-link-attributes
IN sys-mgr
( THIS-PROCEDURE, "Viewer", "SENSITIVE = No" ).
333 RUN inst-disable-fields
IN THIS-PROCEDURE NO-ERROR.
335 /* Code placed here will execute AFTER standard behavior.
*/
339 /* _UIB-CODE-BLOCK-END
*/
344 &IF DEFINED(EXCLUDE-sub2-create-objects) = 0 &THEN
346 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE sub2-create-objects Method-Library
347 PROCEDURE sub2-create-objects
:
348 /*------------------------------------------------------------------------------
349 Purpose
: Master create objects for all maintain viewers
352 ------------------------------------------------------------------------------*/
354 IF VALID-HANDLE( sys-mgr
) THEN
355 RUN add-node
IN sys-mgr
( THIS-PROCEDURE ).
359 /* _UIB-CODE-BLOCK-END
*/
364 &IF DEFINED(EXCLUDE-sub2-display-fields) = 0 &THEN
366 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE sub2-display-fields Method-Library
367 PROCEDURE sub2-display-fields
:
368 /*------------------------------------------------------------------------------
369 Purpose
: Master display fields for maintenance viewers
371 ------------------------------------------------------------------------------*/
373 RUN display-select-fill-ins.
374 RUN display-select-combos.
378 /* _UIB-CODE-BLOCK-END
*/