Posted to tcl by aspect at Mon Nov 09 03:04:46 GMT 2015view raw

  1. oo::class create Light {
  2. method blink {} {
  3. puts blinky!
  4. }
  5. }
  6.  
  7. oo::class create Hue {
  8. constructor {} {
  9. Light create Spot
  10. oo::objdefine [self] forward spot Spot
  11. }
  12. method lights {} {
  13. Spot blink
  14. my spot blink
  15. }
  16. }
  17.  
  18. Hue create ha
  19. ha spot blink
  20. ha lights
  21.