Skip to content

Read_dfini Command

Obsolete

This command is obsolete. It is valid only in character-mode DataFlex. You can use the cIniFile class to read INI files.

See Also

Purpose

To configure the keyboard and other user-interface attributes according to the contents of a file identified in the program.

Syntax

read_dfini path\fileName

Argument Explanation

  • path\fileName: May be of any class, but must be of Type String.

What It Does

read_dfini identifies a file and directory path to be used by the program as its DFINI.CFG file. DFINI.CFG is the name of the file created by the DataFlex Configuration to contain a number of specifications of the user interface, including:

  • Accelerator (function) keys
  • Screen display colors
  • Scroll bar position
  • Mouse parameters
  • Icon strings
  • A number of other factors described in the tool and its documentation.
read_dfini "\dataflex\chess\chessini.cfg"

In this example, the file CHESSINI.CFG in the directory \DATAFLEX\CHESS is identified as the file from which user interface defaults for the program are to be taken.

The DataFlex Configuration loads files named DFINI.CFG by default but permits saving files of different names if you so elect. Differing versions of files of this name can be kept in different directories and found through the value of the HOME environment variable. Configuration files with different names can be found through the value of the DFINI environment variable. read_dfini commands always override the effects of environment variables.

If no path is given, the directory(ies) named in the DFPATH environment variable will be searched for fileName. If fileName is not found, the command has no effect, and no error is declared.

Notes

  • read_dfini should not be used to change the user interface as a program runs, since most user interface attributes can be changed by use of individual commands in the program. It should be used only once in a program, at its beginning.

  • When execution chains from a program that has a read_dfini command in it to another that does not, the DFINI.CFG version used by the first program will continue to be used by subsequent programs. By placing read_dfini in a menu program, you can cause a particular DFINI.CFG version to be used by an entire application.

  • Differing versions of initialization files can be accessed from within programs through the use of the HOME environment variable. The value of this variable also affects where the TERMLIST.CFG file is found.

  • read_dfini is useful where DataFlex programs that use the DataFlex UIMS are in use concurrently with other DataFlex programs that use the Flex Keys of non-UIMS (procedural) earlier revisions. Each of these two types is best used with its own definition of function keys, which in turn requires at least two different initialization files. With the appropriate initialization file, the current DataFlex runtime will support both modes.