Editing the defaults file

Dexterity and developer settings can be added to the defaults file using functions from the Defaults File function library, or by editing the file manually.

Your application must be restarted before changes to the defaults file will take effect in your application.

Using functions to edit the defaults file

You can edit the Dexterity defaults file using the Defaults File function library. Defaults_Write() writes to the defaults file and Defaults_Read() reads from the defaults file.

Although the Windows DEX.INI file displays an equal sign (=) for each setting, you don't need to include the equal sign when you edit settings using functions. The equal sign will be added to the file automatically when you use the Defaults_Write() function.

You can add settings to the defaults file using the Defaults_Write() function. In the following example, a setup form was used to allow the user to set certain options in the system, including a check box to deactivate print dialogs. The following change script was attached to a check box (Suppress_Print_Dialogs) that allows the user to change this setting:

local boolean l_result;

if Suppress_Print_Dialogs = true then
	{User chose to not display print dialogs, so set this setting to true.}
	set l_result to Defaults_Write("NoPrintDialogs", "TRUE");
	{If the user wants to display print dialogs, set this setting to false.}
	set l_result to Defaults_Write("NoPrintDialogs", "FALSE");
end if;

You can read a setting and its value from the defaults file using the Defaults_Read() function. In the following example, a developer setting (a setting not automatically called when either the runtime engine or Dexterity are launched) was added to the defaults file to store a pathname. This pathname can be read from the defaults file and used with a Pathname procedure when the user logs into the application:

local string l_pathname.

{Retrieve the pathname from the Pathname setting.}
set l_pathname to Defaults_Read("Pathname");
set System_Pathname of globals to l_pathname;

Editing the defaults file manually

You may want to edit the defaults file manually to activate development-related settings, such as the DisplayTableErrors or NoPathnames settings. These settings are designed for Dexterity developers to use as programming tools and can be activated by editing the defaults file. To edit the DEX.INI file, use Windows Notepad to open the DEX.INI file, and add any settings and their corresponding parameters. Be sure to include the equal sign for each setting.

We recommend that you NOT edit the DEX.INI file using Windows Write or a text editor other than Windows Notepad.

The following illustration shows how a typical defaults file looks when viewed using Windows Notepad:


Documentation Feedback