next up previous contents
Next: Colors in DsTool Up: Hints and Suggestions for Previous: Tips for Using Geomview   Contents


Tips for the Tcl/Tk Interface in DsTool

DsTool's interface is written in Tcl/Tk. In addition to providing an easy-to-use graphics interface framework, Tcl/Tk is a scripting language, and you can run DsTool entirely by entering commands at the prompt %DsTool. Some other useful tips follow:

  1. Enter the command end_wait if DsTool grabs the input and does not relinquish it. Typically, during computations, DsTool disables mouse input and returns control to the mouse when the computation is finished. If an unexpected error occurs in the computation, control might not be properly restored. The command end_wait typed at the DsTool command prompt should return control to the mouse.

  2. You can modify the default window colors and fonts in DsTool by following the instructions for adding custom Tcl/Tk code to your own version of DsTool. See the accompanying documentation in $DSTOOL/my_dstool/README for more information. The procedure essentially involves adding one line of code, and compiling your own version of DsTool.

  3. While you can run DsTool entirely from the keyboard, it is not recommended that you do so. Typically, a button press will call ``tcl_to_pm'' to update the Postmaster, then ``pm EXEC'' to perform the computation by calling a C routine, and finally ``pm_to_tcl'' to update the interface. However, it may perform other tasks as well. For example, the ``Forwards'' button on the Continuation window checks to see if the number of active parameters selected is the correct number before proceeding. If you insist on running DsTool by typing from the prompt, you should use the procedures that Tcl/Tk calls when a button is pressed, instead of calling the Postmaster routines directly. For example, to replicate a press of the ``Forwards'' button on the Orbits window, instead of typing pm EXEC Flow.Forwards, type orbits(forwards). In addition, if you change an entry in a field, you should follow it with a call of ``tcl_to_pm'' to update the Postmaster. Similarly, if you change a Postmaster entry, you should follow it with a call of ``pm_to_tcl'', to update the interface.

  4. One efficient way to automate long calculations is by writing Tcl scripts. You can run scripts by entering the command ``source filename'' at the prompt. As with the previous note, you should be careful when writing scripts to make sure that you are computing the quantities that you wish to compute.


next up previous contents
Next: Colors in DsTool Up: Hints and Suggestions for Previous: Tips for Using Geomview   Contents
2009-08-07