100DaysOfCode: Day 89

Day 89 is writing the “most dangerous writing” app, where you have to keep typing or the stuff will be gone. The demo was in web format, so I was thinking how I can achieve this, since there are actions, and I think this will involve javaScript (which I don’t know anything about). But then reading harder in the title, I saw the (GUI Desktop App), and that makes this a bit easier. With tkinter only contains a window, a timer (display) and a text field, I should be able to do this. The GUI is fairly easy, and I didn’t get too fancy (I didn’t consider the scroll bar for example or any wrapping), but then we have to think how I can trigger the timer to restart if a key is typed. The window.bind(“<Key”, func) does the trick. Once I figured that out, the rest is easy, just put in count down timer from pomodoro project, and remember to after_cancel the old timer, then it can be done. The project took about fairly long to think, but to write the code, it’s not all that hard.

This entry was posted in 象哥的學習筆記 Study Notes and tagged . Bookmark the permalink.

Leave a Reply