3 Eloquence Graphical User Interface

The CVDLG Utility

CVDLG is a HP-UX utility which converts Eloquence dialog files into Dialog Manager dialog files.

Eloquence dialog files, if accessed by a driver, will be converted temporarily into Dialog Manager format each time a dialog is loaded. However, this is a time consuming process and you may also wish to optimize the dialog layout using the Dialog Manager graphical editor. You may use CVDLG to convert Eloquence dialog files into Dialog Manager dialog files.

Dialog File Name Extensions

The following file name extensions are recommended:

.dlg
Eloquence dialog file
.idm
Dialog Manager dialog file
.idc
compiled Dialog Manager dialog file
The default file name extensions may be re-defined using the eloq.ini file.

NOTE: Compiled Dialog Manager dialog files are platform specific.

Using CVDLG

CVDLG is used with the following command line:

cvdlg [arguments] outfile infile [infile ...]

outfile:
This specifies the destination file name. An extension of .idm is recommended.
infile:
This lists the Eloquence dialog files to be converted. At least one infile must be specified.
The optional arguments must be supplied in the following order:

1 -help
Show program usage.

2 -debugn
Set the internal CVDLG debug level to n.

3 -driver driver arguments
Specify the dialog driver and additional driver arguments. This is equivalent to the parameter supplied to the DLG SET ".driver" statement. Please refer to section Eloquence Dialog Drivers prior in this chapter.
Example:

-driver "motif myoptions -IDMtracefile /tmp/idmtrace"

This will start the motif driver, specifying the user-defined section named [myoptions] and an additional Dialog Manager argument which creates a trace file for debugging purposes.

NOTE: If -driver is not specified, the DRIVER environment variable is used instead. This variable should be set to driver arguments, e.g.:
DRIVER = "motif myoptions -IDMtracefile /tmp/idmtrace"

NOTE: CVDLG uses Eloquence drivers to convert dialog files.
If using the network driver, the output files will be created on the system running the DLGSRV utility. So the destination file name must be specified according to the remote system requirements. If you specify a relative file name, the target file will be created relative to the directory specified in the eloq.ini file.

CVDLG Examples

Example 1:

   cvdlg -driver "motif myoptions" sample.idm sample.dlg
This example will convert a Eloquence dialog file named sample.dlg into a Dialog Manager dialog file named sample.idm using the motif driver. The user-defined section named [myoptions] is used for driver configuration.

Example 2:

   cvdlg -driver @client c:\\dlg\\sample.idm c:\\dlg\\sample.dlg
This example will convert a Eloquence dialog file named sample.dlg into a Dialog Manager dialog file named sample.idm. The network dialog driver DLGSRV is used to perform this conversion, running on the remote PC named client.

Any backslash path separator character must be doubled since the shell uses a backslash as an escape character. You may use the regular HP-UX slash character instead, it will be mapped to backslash by the dialog driver.

The Conversion Process

A Eloquence dialog file is translated in a sequence of DLG NEW and DLG SET statements which are executed by the driver process.

The following sequence of Eloquence statements reflect the internal operation of CVDLG:

   10 DLG SET ".driver","motif"
   20 DLG LOAD "sample.dlg"
   30 DLG CALL RULE "EqSaveDialog","EqDialog"("sample.idm")
   40 DLG STOP
The following example script will show a possible usage of the CVDLG utility using the motif driver. It will convert .dlg files to .idm files. The dialog files are afterwards post-processed by sed (the dialogs are renamed in this step).

If no file names are given on command line, this script will convert all .dlg files in the current directory which have no corresponding .idm files. If any file name is specified on the command line, the corresponding .idm files are overwritten.

#! /bin/sh
echo "mkidm.sh"
force=n
defaults=defaults.eq

if [ -z "$DISPLAY" ]
then
   echo "Motif display required!"
   exit 1
fi

if [ $# != 0 ]
then
   list=$*
   force=y
else
   list="*.dlg"
fi

for i in $list
do
   base='basename $i .dlg'
   idm=$base.idm
   idc=$base.idc

   if [ ! -f $idm -o $force = y ]
   then
      echo "\\n$i -> $idm"

      rm -f $idm $idc

      /usr/eloquence/cvdlg -driver motif +arg $defaults $idm $i
      if [ $? != 0 ]
      then
         echo "failed!!"
         exit
      fi

      sed -e "s/EqDialog/Dlg_$base/g" %<$idm >$$
      if [ $? != 0 ]
      then
         echo "sed failed!!"
         exit
      fi
      mv $$ $idm
   fi
done


Eloquence Dialog Manual - 19 DEC 2002