Progress
Programming
Handbook
Specifying Default Frames
Whenever you name a frame within a block’s header statement, the frame that you name becomes the default frame for that block.
For example, the header statement in the following FOR EACH block names a frame, so Progress allocates that frame instead of an unnamed frame. Frame a is the default frame for the block. Because the DISPLAY statement does not explicitly name another frame, it uses frame a:
The header statement in the following FOR EACH block doesn’t name a frame, so Progress allocates a default unnamed frame:
In these two examples, naming the frame does not affect the appearance of the output, which is the same for both procedures. However, in many cases, naming the default frame can affect the appearance of the output. Whether it does or not depends on the scope of the frame, the type of frame, where you reference the frame, and how you reference it. These issues are described in detail later in this chapter. However, the following two procedures illustrate how naming the default frame can affect the appearance of your output.
These procedures are identical, except that the first uses a FORM statement and the second uses a DEFINE FRAME statement to describe the frame. For more information on the FORM and DEFINE FRAME statements, see Interface Design."
When you run the
p-form.p
procedure, all of the customer records flash on screen. For more information, see the "Frame Flashing" section. When you run thep-deffrm.p
procedure, 15 records are displayed at a time, and there is no flashing.Flashing occurs in the first procedure because of how the frame is scoped. The scope of a frame is the range or extent of the frame’s availability within a procedure. For more information on frame scope, see the "Frame Scope" section.
The FORM statement scopes the frame to the procedure block; the DEFINE FRAME statement does not scope the frame. In both procedures, the frame is the default frame for the FOR EACH block. However, Progress provides different frames services, depending on whether the frame is scoped to an iterating block. If it is scoped to an iterating block, Progress advances and clears the frame (avoiding any flashing). If it is not scoped to an iterating block, Progress does not advance for each iteration.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |