home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tclX6.5c / tclsrc / tkdemo.tcl < prev    next >
Encoding:
Text File  |  1992-12-19  |  1.2 KB  |  36 lines

  1. #
  2. # tkdemo --
  3. #
  4. # Run the Tk demo at anytime after Extended Tcl is installed.
  5. #------------------------------------------------------------------------------
  6. # Copyright 1992 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 1.2 1992/12/19 07:57:51 markd Exp $
  16. #------------------------------------------------------------------------------
  17. #
  18.  
  19. #@package: Tk-demo tkdemo
  20.  
  21. proc tkdemo {} {
  22.     global TCLPATH
  23.     if {[info commands tkwait] == ""} {
  24.         error "tkdemo may only be used from wishx"
  25.     }
  26.     set demos [searchpath $TCLPATH demos]
  27.     if {$demos == "" || ![file isdirectory $demos]} {
  28.         error "can't find Tk `demos' directory on the TCLPATH ($TCLPATH)
  29. Extended Tcl must be installed with the Tk demos option to use this procedure"
  30.     }
  31.     uplevel #0 source $demos/widget
  32. }
  33.  
  34.  
  35.