View Single Post
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#296
Originally Posted by Wonko View Post
So, all clock styles need to be changed accordingly.
The change affects the constructor which now uses three (including self) parameters.
If you use the constructor for initialization etc. you need to forward the third parameter to the super constructor to make your clock work again.
If you do nothing else in your constructor except calling the super constructor you could as well delete the constructor.
Ummm... (Great work btw: I thought this would take a long time to get implemented, but here you are, making the Advanced Clock Plugin even better.)

So am I changing
def __init__([something in here])
or
clock.Clock.__init__([something in here])
or both?

If I understand correctly, I can just delete the __init__ area for something like the Binary4DotClock, since nothing happens in the init area. However, I do need the __init__ area for the clock style I'm currently working on, since that's where I initially create some variables which I need existing before the draw clock area takes over and runs with them indefinitely.

- Edit -
Enceladus, here you go, fixed Binary4Dot:
Binary4DotClock.py.txt
Also, here's the fixed DateTimeLinearClock, for the guy who wanted that originally, since that broke with this update too:
DateTimeLinearClock.py.txt

Last edited by Mentalist Traceur; 2011-01-15 at 17:21. Reason: Added updated Binary4DotClock and DateTimeLinearClock
 

The Following 3 Users Say Thank You to Mentalist Traceur For This Useful Post: