Initialization Settings and Files

Initialization settings are primarily used to configure the user interface of a Uniface application on a specific platform. On all platforms, it is possible define a local initialization file for the application. Settings in the local file usually take precedence over those in the global file or environment variables.

On Windows, settings are defined in global initialization file called usys.ini. On other platforms, settings are defined as environment variables (or the equivalent logical or data area).

Initialization settings are first read when the Uniface application is started. Using the $setting ProcScript function, it is possible read the values of initialization settings, and dynamically change the runtime values of some of them. For more information, see $setting and deletesetting.

Initialization Settings

An initialization setting can be a:

  • Setting in an initialization file (on all platforms)
  • Environment variable (on all platforms )
  • Data area or system value (on iSeries)
  • Key value in the Registry (on Windows )

Settings in an initialization file or registry are grouped into file sections or keys that address specific aspects of the runtime environment. Most settings are related to the user interface, which is platform-dependent, so most file sections and initialization settings are applicable only for Windows platforms.

On Windows, settings in the [state] section are stored in the Windows Registry (rather than the .ini file) when the user exits an application. Settings in the [layout] section determine whether state information is stored.

Only the settings in the [paths] section are applicable for all Uniface platforms. These are defined as environment variables on Unix and Linux, and iSeries. For this reason, no initialization file is delivered for iSeries, and the usys.ini for Unix contains only the [install] and [webwidgets] sections. However, it is possible to define an initialization file for non-Windows platforms, which contains the local WorkDir and USYS path logicals. For more information, see WorkDir and USYS Path Logicals.

Global and Local Initialization Files

The default initialization file for Uniface is usys.ini. You can optionally create a local .ini file for your application that can be specified using the /ini command line switch. For more information, see usys.ini and /ini.

When Uniface looks for a setting, it first looks in the local .ini file, and if it does not find it there, it looks in usys.ini (or the environment variable on non-Windows platforms). However, for some settings in [uniface_dlls], it looks only in usys.ini.

The maximum length of a line in an .ini file is 512 characters.

Related Topics