home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / TCL / ITCL / _ITCL.TAR / usr / lib / itcl / tests / Geek.tcl < prev    next >
Encoding:
Text File  |  1994-03-21  |  2.0 KB  |  58 lines

  1. #
  2. # Test class for [incr Tcl] test suite
  3. # ----------------------------------------------------------------------
  4. #   AUTHOR:  Michael J. McLennan       Phone: (610)712-2842
  5. #            AT&T Bell Laboratories   E-mail: michael.mclennan@att.com
  6. #
  7. #      RCS:  Geek.tcl,v 1.1.1.1 1994/03/21 22:09:51 mmc Exp
  8. # ----------------------------------------------------------------------
  9. #               Copyright (c) 1993  AT&T Bell Laboratories
  10. # ======================================================================
  11. # Permission to use, copy, modify, and distribute this software and its
  12. # documentation for any purpose and without fee is hereby granted,
  13. # provided that the above copyright notice appear in all copies and that
  14. # both that the copyright notice and warranty disclaimer appear in
  15. # supporting documentation, and that the names of AT&T Bell Laboratories
  16. # any of their entities not be used in advertising or publicity
  17. # pertaining to distribution of the software without specific, written
  18. # prior permission.
  19. #
  20. # AT&T disclaims all warranties with regard to this software, including
  21. # all implied warranties of merchantability and fitness.  In no event
  22. # shall AT&T be liable for any special, indirect or consequential
  23. # damages or any damages whatsoever resulting from loss of use, data or
  24. # profits, whether in an action of contract, negligence or other
  25. # tortuous action, arising out of or in connection with the use or
  26. # performance of this software.
  27. # ======================================================================
  28.  
  29. itcl_class Geek {
  30.  
  31.     #
  32.     #  Constructor/destructor add their name to a global var for
  33.     #  tracking implicit constructors/destructors
  34.     #
  35.     constructor {config} {
  36.         global WATCH
  37.         lappend WATCH [info class]
  38.     }
  39.     destructor {
  40.         global WATCH
  41.         lappend WATCH [info class]
  42.     }
  43.  
  44.     method do {cmds} {
  45.         return "Geek says '[eval $cmds]'"
  46.     }
  47.  
  48.     method config {config} {
  49.         return $config
  50.     }
  51.  
  52.     #
  53.     #  Define variables that will be shadowed by another class.
  54.     #
  55.     public blat
  56.     protected _blat
  57. }
  58.