13. Building Applications : The Create a Frame or Procedure Frame : Creating a User-Specified Frame
 
Share this page                  
Creating a User-Specified Frame
A user-specified or USER frame has two basic components, although you can include others:
A form created with the ABF FormEdit operation
A 4GL source code file that you enter using the system editor
In addition, you can create procedures, variables, and constants that the source code file can call and manipulate. Creating procedures, variables, and constants is discussed below.
The Edit a USER Frame Definition frame is equivalent to the Edit an Application frame for applications. Define the basic details for the user frame here. From this frame, use the FormEdit operation to create the form. Use the Edit operation to call the system editor to create the source code file.
You can enter and edit the Short Remark field, Form Name, Source File, Return Type, and Static fields here.
Frame Name
(Read-only) Holds the name of the frame
Short Remark
Specifies an optional brief description of the frame
Form Name
Specifies the form associated with this frame. The default is the frame name, but you can change this. For more information on creating forms, see Forms in ABF Applications.
Source File
Specifies the name of the 4GL source code file associated with this frame. The default filename combines the suffix .osq with the frame name. The suffix .osl appears with QUEL files. For information on using QUEL, see Notes for Users of QUEL.
The file name must be unique to the frame--it cannot belong to another frame or procedure. ABF can truncate or change the default name if it is too long or conflicts with other source code file names. Use the Edit operation to create the file with the system editor. Do not include a directory path as part of the file name. All source code files must reside in the specified source code directory.
Return Type
Provides the data type of any values to be returned from this frame.
Legal return types are any Ingres type, "string," or "none." You cannot use record or array types. To see available Return Types, use the ListChoices menu operation.
A "string" or Ingres type can also be nullable. Use the Nullable field to specify this.
Static
Indicates yes or no (the default) to specify whether the data on the frame's form is saved and redisplayed the next time the frame is called.
Typically, this field must be set to no. If you enter no, ABF clears the fields on the frame's form each time the application displays the frame.
If you enter yes, ABF preserves the data entered on the frame's form, and redisplays the form with that data the next time the application calls the frame.
If a form is shared by more than one frame, do not use the Static feature. Data entered on the Static form in one frame appears in the other frame.
If the current application uses some non-compiled forms, another field appears that allows you to specify whether this frame uses a compiled form or fetches its form from the database at run time.
The remaining fields give information about the user who created the form (the Owner), and when the frame was created and its definition last modified.
These operations are available from the Edit a USER Frame Definition frame:
NewEdit
Selects or creates the definition of a different component from a submenu that appears on the menu line. Prompts for type and name of component.
Go
Runs the application starting at the current frame. You cannot run the application from an individual frame unless all the frames are error-free.
Edit
Uses the system editor to create or edit the file containing the 4GL specification for the current frame
Compile
Checks the 4GL syntax for current frame, display errors (if any), and add the compiled source code for the frame to the application if free of errors. If errors exist, ABF creates an error listing file in the object code directory. ABF asks if you want to display the errors.
FormEdit
Runs Visual Forms Editor (VIFRED) to create or edit a form for the current frame
LongRemark
Displays or enters more information about the selected frame on the LongRemark pop-up frame
Print
Prints the frame definition including the text file containing the 4GL specification
ListChoices
Displays a menu of legal values for the current field or a field description
Cancel, Help, End
Perform\ standard operations