Posted to tcl by evilotto at Tue Dec 08 23:29:10 GMT 2015view raw
- oo::class create Aclass {
- method thing {} {
- callthings
- }
- method nothing {} {
- my destroy
- callthings
- }
- }
- proc callthings {} {
- foreach obj [info class instances Aclass] {
- puts "$obj -> [info object class $obj]"
- }
- }
- Aclass create foo
- Aclass create bar
- foo thing
- bar nothing