home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / ObjectTcl-1.1 / examples / Simple / TestB.tcl < prev   
Encoding:
Text File  |  1995-06-30  |  590 b   |  26 lines

  1. # TestB.tcl
  2.  
  3. puts "About to construct an instance of class A"
  4. set a [otclNew A NULL]
  5.  
  6. puts "\nAbout to call method doIt on instance of class A"
  7. $a doIt
  8.  
  9. source B.tcl
  10. puts "\nAbout to construct and instance of class B"
  11. set b [otclNew B NULL 5]
  12.  
  13. puts "\nAbout to call method doIt on instance of class B"
  14. $b doIt
  15.  
  16. puts "\nSetting instance of class A to point at instance of class B"
  17. $a setNext $b
  18. puts "About to call method doItNext on instance of class A"
  19. $a doItNext
  20.  
  21. puts "\nAbout to destruct instance of class A"
  22. otclDelete $a
  23.  
  24. puts "\nAbout to destruct instance of class B"
  25. otclDelete $b
  26.