Posted to tcl by crshults at Mon Jun 01 15:42:25 GMT 2015view raw
- package require TclOO
- oo::class create small_class {
- constructor {} {}
- method hello {} {puts hello}
- }
- oo::class create large_class {
- constructor {} {
- small_class create myFirstSmallObject
- small_class create mySecondSmallObject
- }
- method hello {} {
- myFirstSmallObject hello
- mySecondSmallObject hello
- }
- }
- large_class create myLargeObject
- myLargeObject hello