User Tools

Site Tools


tplprocwindow.htm
Navigation:  Application Generator > Procedure Properties >====== Procedure Properties ====== Previous pageReturn to chapter overviewNext page

These dialogs–each is customized according to the procedure template–contain entry boxes in which you can add a text description for the procedure, or specify its source code module, plus command buttons which lead to the dialogs which allow you to customize the procedure.

Each procedure has its own custom help page which you can access by pressing the Help button on the Procedure Properties dialog. If you are using a third party template, or a template which you wrote yourself, this help topic will appear.

Therefore, this help page only describes the essential elements of the Procedure Properties dialog; the controls which each procedure template builds upon.

Clarion's Template language allows the template writer to add controls to the Procedure Properties dialog. These controls vary from template to template. Since each template performs a different task, the template writer provides whatever controls and options are necessary to gather input from you, the developer. Most of your input is stored in template variables (Template Symbols). When generating code, the Application Generator processes the template language code, and fills in the Template Symbols with the options you specify. As it does so, it generates your application's source code.

A Procedure Properties dialog could have, for example, a checkbox to specify that an MDI window should save its position in the .INI file between sessions. Each template adds controls such as these to the Procedure Properties dialog, to gather choices from you. At code generation time, the Application Generator evaluates a symbol which stored your choice as to whether you wanted to save the MDI window position. If the checkbox was marked “yes,” the Application Generator processes the template code containing the executable code to support saving the window position, and writes it to the generated source code file.

Procedure Name The Procedure Name is displayed here. Press the ellipsis button to change the name if desired. You will be prompted for a New Procedure Name, and the ability to Accept or Discard your changes.
Template The base template type used by this procedure is displayed here. You can change the template type by pressing the ellipsis button to the right. The Select Procedure Type dialog is displayed for a new selection if needed.
Description A short text description for the procedure, which appears next to the procedure name in the Application Tree dialog.Press the ellipsis ( … ) button to edit a longer (up to 1000 characters) description.
Category A category is used to help you group procedures together when the Category Tree Mode is active.
Module Name The source code file to hold the code for the procedure. Select from the dropdown list. By default, the Application Generator names modules by taking the first five characters of the .APP file name, then adding a three digit number for each module.
Prototype Allows you to optionally type a custom procedure prototype which the Application Generator places in the MAP section.
Parameters Allows you to optionally enter any parameter names (a list of variables separated by a comma)
Actions If any control templates were pre-defined in the current procedure template, or were in a window or report by you, this button accesses the Actions dialog for the control templates.Control templates provide “off the rack” controls, such as list boxes, and the code to maintain them. This allows you to start with a “bare” procedure template, such as the generic window, and add controls to create your own browse or form windows.
Window Calls the Window Designer, to visually design the window. Press the ellipsis button to access the Window Editor.
Report Calls the Report Designer, to visually design the window. Press the ellipsis button to access the Report Editor.
In the Actions Properties dialog:
Parameters Located in the Procedure Properties Actions dialog, this allows you to specify parameter names (an optional list of variables separated by commas) for your procedure, which you can pass to it from a calling procedure. You must specify the functionality for the parameters in embedded source code.
Return Value Located in the Procedure Properties Actions dialog, this option lets you specify the variables receiving return values from functions (functions return values, procedures do not).

blk2blue.jpg

Procedure Tabs

In addition to the standard procedure prompts, there are Procedure Tabs that access other important procedure components:

Calls References procedure calls made in hand-coded, embedded source.
Select this tab to access the Called Procedures dialog. To add a procedure, enter the procedure name in the Add a New Procedure section and press the Add button.
If procedure calls already exists, the procedures appear selected in the Called Procedures dialog. To add another, simply select it. To delete a call simply deselect it. Additional buttons allow you to select all or deselect all as needed.

TipBox.jpg

The purpose of the Calls tab is to add procedures called in embedded source code. The normal way to add template procedures to the Application Tree is to create a menu or toolbar command, add the procedure name via its Actions button, and let the Application Generator automatically add it to the tree.

Embeds Displays the Embedded Source dialog. You can then select either a field specific event or window related action, then add executable source code to customize how the procedure will handle it.
After you choose an embed point in the Embedded Source dialog, you choose the code to execute. You can specify a call procedure, which is then added to the tree. You can write your own code with the text editor. Or, you can choose and customize a code template, which is a combination of pre-written code and prompts to “fill-in-the-blanks.”
Embedded source gives you complete control over all the processing in your procedures. It's one of the most powerful tools Clarion provides you.
Extensions Accesses extension templates, if any are installed on your system. Extension Templates allow additional functionality through “add-ins” to the Application Generator.
Formulas Accesses the Formula Editor, which allows you to create computed and/or conditional fields, which you can then reference in the controls you place in your windows and reports.
tplprocwindow.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1