Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: Glish/PGPLOT Up: Glish/Tk Previous: Canvas

Version Number and Utility Functions

The information about which version of Tk is currently being used can be obtained from the system record, e.g. :

    print "tk version:", system.tk.version, system.tk.version::, system.tk.version::tcl::
prints something like:
    tk version: 8.0 [patch=8.0p2, tcl=8.0] [patch=8.0p2]

Finally, there are a couple of utility functions you might find useful.

You can use have_gui to check if a graphical output device is available. It returns T if such a device is available and the Tk widgets can be used. Otherwise, it returns F.

Typically, tk_hold and tk_release are not needed, but sometimes when a large number of widget creation/deletion operations are done, the GUI may go through contortions. This is due to intermediate operations being processed and reflected in the GUI before the group of operations has finished. Therefore, tk_hold and tk_release can often be used to take care of this problem. A call to tk_hold prevents any Tk operations from being processed until tk_release is called.

It is important that calls to tk_hold be balanced with an equal number of calls to tk_release. Otherwise, the GUI can freeze preventing any further interaction.


next up previous contents index
Next: Glish/PGPLOT Up: Glish/Tk Previous: Canvas   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15