I find lots of information about creating composite widgets in Tk; I don't find so much about how to create 'composite items' on a Canvas, or Zinc specifically, which is what I do (?) in my code. Can you point me to some code that implements objects that represent complex item collections on a canvas? (or documentation of such a pattern)
I already pointed you to the TripleRotatingWheel in the Zinc demo, and the Bubbles on Zinc at Re^3: Tk/Zinc mouse drag performance issues? I use the ztkbubble example as a basis for making almost any type of composite item on Zinc.
I think basically the idea is to bless an object with Zinc as the parent, then make a group in it. Then have methods for the object and internal timers to make it alive. :-)
Other than that, this is beginning to sound like work. :-)
I'm not really an OO oriented type of programmer, but to me there are 2 possible paths....
1. Create your Zinc canvas, and pass it as an option to your new class, like ztkbubble, so you can have a parent widget for your objects.
2. Subclass Zinc, and make your own Zinc class. You can then add your own methods etc to it.
Your script works well here, fast and peppy, but with that grabglobal, I can't start a top to see cpu usage. :-)
I'm not really a human, but I play one on earth Remember How Lucky You Are