Version 0 of itcl::find

Updated 2006-07-15 15:26:11

Finds itcl objects and classes.

  package require Itcl
  itcl::class helloworld {
    public variable owner "No-one"

    method greet {} { puts "Hello World from $owner" }
  }
  itcl::class goodbyeworld {
    inherit helloworld

    method greet {} { puts "Goodbye Cruel World from $owner" }
  }
  puts "Classes available are [itcl::find classes]"
  helloworld  h1
  goodbyeworld h2
  helloworld  h3
  h1 configure -owner Me
  h2 configure -owner You
  h1 greet
  h2 greet

  puts "Class helloworld [itcl::find objects -class helloworld ]"

will tell you that h1 and h3 are objects of class helloworld.

  puts "Class helloworld [itcl::find objects *1 -class helloworld ]"

will report just those objects whose name ends in 1 (h1 in this example). GWM