User Tools

Site Tools


lesson_11_global_application_properties.htm
Navigation:  User's Guide and Tutorials > The Application >====== Lesson 11 - Global Application Properties ====== Previous pageReturn to chapter overviewNext page

You can specify a number of settings that apply to your entire application, including table handling defaults, use of .INI files, global variables, template extensions, list box formats, keyboard redirection, control focus, visual styles, and embedded source code. These “global” settings are done primarily through the Application Properties tab and Actions dialog.

globalProperties.jpg

Global Template Settings

The prompts on the Global Properties tabs are provided by the Application Template.

See Global Properties in the core help for a detailed description of each of these prompts.

The tabs in the Application Editor (Embeds, and Extensions) are provided by the Application Generator, and are described in this section.

Global Data and Variables

Global data must be declared before the CODE statement in your PROGRAM module. There are several ways to accomplish this with the Clarion environment. You can declare global data in the data dictionary (see Dictionary Editor'File Properties); you can declare global data with the Data / Tables Pad; and you can declare global data with the Embeds tab in the Application Editor (embed data declarations in a data section embed point'see the Embedded Source Code topic).

Data Dictionary global data

Declares global data that can be shared by several applications. Because it is declared with the Column Properties dialog, you can specify controls and properties to apply to the data each time you populate them on your application's windows and reports.

Data / Tables Pad Global Data

Declares global data for a single application. Because it is declared with the Column Properties dialog, you can specify controls and properties to apply to the data each time you populate them on your application's windows and reports.

Application Editor Embeds tab

Declares global data for a single application with free form source code.

To access the Global Properties dialog, go to the Application Tree dialog and select the Properties tab.

To add global variables, select the Global Data section and press the Add button in the Data / Tables Pad.

To add a new variable to the list ' Data / Tables Pad

1.Select the Global Data section, and press the Add button.

2.Fill in the Column Properties dialog.

The Column Properties dialog is the same dialog used to add a column to the Data Dictionary. You can set all the characteristics of the variable, including the data type, length, label, etc. in this dialog. See Dictionary Editor'Adding or Modifying Columns.

3.Press the OK button to close the Column Properties dialog.

The Column Properties dialog appears. Press Cancel to stop adding new columns.

To change the data type or label of a global variable

1.Select the Data / Tables Pad, and highlight the variable in the Global Data section.

2.Press the Change button.

3.Make any changes necessary in the Edit Column Properties dialog then press OK.

To reposition a global variable

1.In the Data / Tables Pad, to move a variable up in the list, highlight it, and then drag it up or down as needed.

Global Embed Points

The global embed points are provided by the Application Template. See Global ABC Embed Points in the Template Guide for more information on these embed points.

To access these embed points, press the Embeds tab in the Application Editor dialog. As with any embed point, you can write your own custom code, call a procedure, or use a code template. The Application Generator, when generating code, places your code or calls your procedure at the next source code line following the point you pick from the Embedded Source dialog. See the Embedded Source Code topic for more information on adding embedded source code to your application.

Global Extensions

The Global Extensions tab in the Application Editor lets you add Extension templates to your application. Extension templates generate a variety of task oriented source code statements at one or more preset locations as needed to accomplish the extension task.

Templates that you may use in your application are listed. Refer to the Template Guide in the core help for a description of these templates.

Next: Lesson 12 - Advanced Features of the Application Generator

lesson_11_global_application_properties.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1