Progress Programming Tips

By Rod Gaither (rdg@worldinfo.com)


PPT-22  Putting code in trigger blocks

Tip:

One tendency in programmers new to event-dirven Progress
development is to put large amounts of logic in their trigger
blocks.  With the ease of access to either trigger blocks or
internal procedures within the UIB this is an easy habit to form. It
is not a good habit though as you inevitably need to execute that same
logic from more than one place in your program.  The trigger is a
logical place to start thinking about the processing you need related
to an event but the bulk of the processing should be isolated, and
defined by using internal procedures.

Try and keep your trigger block code to processing specific to
the trigger - run other internal procedures for logic, set
variables from screen values, and test return values to determine
whether a no-apply should be used.

Wisdom:

Do not assume that because a tool helps you program in a
certain way that it is a good way.

Rod Gaither                  | rdg@worldinfo.com
World Information Systems    | (910) 333-2580  Voice
Greensboro, NC               | (910) 333-2584  Fax