home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / devel / tcl / tclx7_31.z / tclx7_31 / tcldev / tclX7.3a-p1 / tktclsrc / tkdemo.tcl < prev   
Encoding:
Text File  |  1993-11-19  |  1.2 KB  |  35 lines

  1. #
  2. # tkdemo --
  3. #
  4. # Run the Tk demo at anytime after Extended Tcl is installed.
  5. #------------------------------------------------------------------------------
  6. # Copyright 1992-1993 Karl Lehenbauer and Mark Diekhans.
  7. #
  8. # Permission to use, copy, modify, and distribute this software and its
  9. # documentation for any purpose and without fee is hereby granted, provided
  10. # that the above copyright notice appear in all copies.  Karl Lehenbauer and
  11. # Mark Diekhans make no representations about the suitability of this
  12. # software for any purpose.  It is provided "as is" without express or
  13. # implied warranty.
  14. #------------------------------------------------------------------------------
  15. # $Id: tkdemo.tcl,v 3.0 1993/11/19 07:01:10 markd Rel $
  16. #------------------------------------------------------------------------------
  17. #
  18.  
  19. #@package: Tk-demo tkdemo
  20.  
  21. proc tkdemo {} {
  22.     global auto_path
  23.     if {[info commands tkwait] == ""} {
  24.         error "tkdemo may only be used from wishx"
  25.     }
  26.     set demos [searchpath $auto_path demos]
  27.     if {$demos == "" || ![file isdirectory $demos]} {
  28.         error "can't find Tk `demos' directory on the auto_path (auto_path):
  29.     }
  30.     uplevel #0 source $demos/widget
  31. }
  32.  
  33.  
  34.