Thanks for the repsonses,
Your ADeskClock::get*Angle() methods are not very
efficient:
Yeah, that's one thing I've been working on. I have already
spotted the multiple time.time() things, and now just refresh
one currentTime variable to be used everywhere. I don't quite
know enough phython to understand how your condensed code
example fully works, but it's all part of the learning
process I guess. I will study it.
I did condense them all down into one getAngle(handType)
method in v0.0.3, but then in 0.0.4 reintroduced separate
get*Angle() methods, since the hour hand now work differently
- it steps in quarter hour angles for more accuracy, whilst
minute and second only ever point to integer
minutes/seconds.
You redraw the whole window image onto buffer at each
step
This is another thing that I'm aware of, but just not
confident enough yet to try and seperate it. It's on my to-do
list now though ;)
In this case, there is no need to call
ADeskClock::render() from ADeskClock::ready(), since
ADeskclock::alarm() is called right after
ADeskClock::render() returns anyway.
Hmm, me thinks I need to study the adesklets API a little bit
more. Thanks for the tips.
How about adding some numbers to the clock face?
Hehheh :D I know, I've put some "big dots and small dots"
(tm) in v0.0.4 to help with that. I'm not really good with
digital art, so the graphics could be much better.
---
The whole thing will most probably need a re-write at some
stage, as I learn more about python and to clean it up/make
it efficient. I'll put the latest two versions up now anyway.
v0.0.3 just has a single getAngle() method, but I've had to
put them back in v0.0.4, since I didn't know how else to have
different calculations done for each hand.
Thanks once again guys, I really mean it. Your support has
been great!
Regards,