Progress Programming Tips
By Rod Gaither (rdg@worldinfo.com)
PPT-12 Code for UIB is running
Tip:
When developing programs in the UIB it is often useful to put
special code in for testing purposes from within the environment. The
example below is a simple preprocessor block that is used in a dialog
box that takes parameters. By defining the parameters as variables
when the UIB is running you could provide some hardcoded values so
that the dialog will actually run in the UIB environment and allow for
testing of more of the internal operations while in the UIB.
---- Code insert begins ----
&IF DEFINED(UIB_IS_RUNNING) = 0
&THEN /* Real Code for Production */
DEFINE INPUT PARAMETER pi-type AS CHAR NO-UNDO.
DEFINE INPUT PARAMETER pi-title AS CHAR NO-UNDO.
&ELSE /* Local Version for UIB */
DEF VAR pi-type AS CHAR NO-UNDO.
DEF VAR pi-title AS CHAR NO-UNDO.
ASSIGN
pi-type = "Vendor"
pi-title = "Vendor Lookup by Name".
&ENDIF
---- Code insert ends ----
Wisdom:
My boss likes to compare the concentration required to program
well similar to building a mental house of cards. One distraction can
bring down the whole house, causing a much more severe loss of
productive time than the length of the distraction itself.
Rod Gaither | rdg@worldinfo.com
World Information Systems | (910) 333-2580 Voice
Greensboro, NC | (910) 333-2584 Fax