dmh83 - Version specific name of dmh_wish
libdmh83.so, libdmh83.sl, dmh83.dll - shared libraries for dynamic loading
dmh83 ?options? ?arg arg ...?
When the -file option is used without the -console option, console input is disabled on POSIX systems, and the console is hidden on NT systems.
The Hume Integration toolset installs an extended Tcl/Tk program having a version specific name such as dmh83 as well as installing the same program under the version independent name dmh_wish. Dmh_wish is a single program consisting of the Tcl command language, the Tk toolkit, DMH mailbox messaging extensions, Realtime Data Hub extensions, and logic that reads commands from standard input or from a file. By default, it creates a main window and then processes Tcl commands. If dmh_wish is invoked with no -f option then it reads Tcl commands interactively from standard input. It will continue processing commands until all windows have been deleted or until end-of-file is reached on standard input.
When used interactively, if there exists a file .dmhrc in the home directory of the user, dmh_wish evaluates the file as a Tcl script just before reading the first command from standard input. On Windows NT, the home directory is established by creating the environment variable HOME, with a value of a Unix style slash delimited pathname such as c:/users/joe. Use the Control Panel application System or the Tcl command regset to do this.
If the -file option is provided to Tk, then dmh_wish reads Tcl commands from the file named in the -file option. These commands will normally create an interactive interface consisting of one or more widgets. When the end of the command file is reached, dmh_wish will continue to respond to window events until all windows have been deleted. There is no automatic evaluation of .dmhrc in this case, but the script file can always source it if desired.
Recent versions of Tcl/Tk are built with shared libraries on all platforms. On Windows, the shared library DLL files are found by the operating system in the same directory as the executeable. On POSIX systems, the shared libraries are found by the operating system if they are installed in the system directories, /lib, /usr/lib, or /usr/local/lib. If the libraries are installed elsewhere, an environment variable must be set. The proper environment variable differs for the specific operating system:
# example LIBPATH=$LIBPATH:$pwd/usr/local/lib:/lib:/usr/lib; export LIBPATH
# example SHLIB_PATH=$SHLIB_PATH:$pwd/usr/local/lib; export SHLIB_PATH
# example LD_RUN_PATH=$LD_RUN_PATH:$pwd/usr/local/lib; export LD_RUN_PATH
# example LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$pwd/usr/local/lib; export LD_LIBRARY_PATH
The following environment variables affect various aspects of using Tcl/Tk and the DMH package. For convenience, this list includes items that are more closely related to other programs and application scripts than to dmh_wish.
On Unix systems, if you create a Tcl script in a file whose first line is
#!/usr/local/bin/dmh_wish -fthen you can invoke the script file directly from your shell if you mark it as executable. This assumes that dmh_wish has been installed in the default location in /usr/local/bin; if it's installed somewhere else then you'll have to modify the above line to match.
A better alternative on Unix systems is to start your script programs with:
#!/bin/sh # restart using first dmh_wish on PATH \ exec dmh_wish -f "$0" "$@"
See wish(1) for an explanation.
On Windows NT, you can create batch files with the filename extension of .bat or .cmd to have the command interpreter recognize them as executable. The contents of a batch file might be:
start /b dmh_wish -f /users/joe/myscript.tclAnother trick on Windows NT is to have a .bat file that contains Tcl code, and can start itself. For example, you might create a file, myscript.bat, that starts out with:
start dmh_wish -tclargs "proc start args {} ; proc goto args {} ; source myscript.bat"
goto EndOfTcl
#
# Insert Tcl code HERE
#
# \
:EndOfTcl
As a rule of thumb, you use Unix style slash pathnames for any pathname that is processed by the Tcl/Tk logic, and DOS style backslashes for Windows programs. Windows NT 3.51 needs the "start" command to run a program independent of the current shell process, but Windows NT 4.0 does not. Another example is:
start /b d:\usr\local\bin\dmh_wish -f /users/joe/myscript.tcl
On Macintosh systems, if there is file named autoexec.tcl in the working folder of the program, the file is executed when the program starts. In this file you can place Tcl code to set the command line variable argv, and to source specific scripts. Use the colon as the pathname delimiter when referring to the Mac filesystem, or use the file join command.
source [file join $env(DESK_FOLDER) "My App Folder" myapp.tcl]On the Macintosh you can also use the commands console hide and console show to hide the command line console or make it visible.
When dmh_wish is invoked interactively it normally prompts for each command with ``% ''. You can change the prompt by setting the variables tcl_prompt1 and tcl_prompt2. If variable tcl_prompt1 exists then it must consist of a Tcl script to output a prompt; instead of outputting a prompt dmh_wish will evaluate the script in tcl_prompt1. The variable tcl_prompt2 is used in a similar way when a newline is typed but the current command isn't yet complete; if tcl_prompt2 isn't set then no prompt is output for incomplete commands.
On Unix, you can set X-Windows resources in your .Xdefaults file in your home directory. The options(n) man page describes the Name and Class of window system widget attributes that you can set. You need to refer to your X-Windows documentation to fully understand use of resources. For example, to change the default foreground and background colors, of the "ui" Tcl/Tk application, you could use the following lines in your .Xdefaults file:
Ui*Background: Grey Ui*Foreground: BlackNote that the application name, ui, was mapped to the resource name, Ui, by folding the first letter to uppercase. On Unix, you can use the X-windows applications xfontsel and xcolors to see the available font and color choices.
On Windows NT and the Macintosh there is no .Xdefaults or xrdb application. You can change your window system attributes using the option command inside of your Tcl source code as in:
option add *Background Grey
option add *Canvas*Background LightGray
option add *Scrollbar.foreground SlateGrey
option add *activeBackground SlateGrey
option add *disabledForeground SlateGrey
option add *Text*Background LightGray
option add *selectBackground LightBlue2
option add *selectForeground Black
#option add *font -adobe-helvetica-bold-r-normal-*-12-120-*-*-*-*-*-*
#option add *font -misc-fixed-medium-r-normal--13-120-75-75-c-80-iso8859-1
# font "Ansi" is for Windows only
option add *font Ansi
# on the Macintosh:
option add *font {monaco 9 normal}
option add Reporthighlight*font {monaco 9 {bold italic}}
These lines of code can be added to your .dmhrc file for interactive usage
of dmh_wish, or put in a file and source'd into a non-interactive
Tcl/Tk application.
On Windows NT, you specify colors just as you do in Unix, using X-windows colornames or RGB numeric values (see colors).
In addition, the following names are also supported on Windows NT for the system colors:
System3dDarkShadow
System3dLight
SystemActiveBorder
SystemActiveCaption
SystemAppWorkspace
SystemBackground
SystemButtonFace
SystemButtonHighlight
SystemButtonShadow
SystemButtonText
SystemCaptionText
SystemDisabledText
SystemGrayText
SystemHighlight
SystemHighlightText
SystemInactiveBorder
SystemInactiveCaption
SystemInactiveCaptionText
SystemInfoBackground
SystemInfoText
SystemMenu
SystemMenuText
SystemScrollbar
SystemWindow
SystemWindowFrame
SystemWindowText