Re: after() Funktion nur einmal möglich?
Verfasst: Mittwoch 24. Januar 2018, 18:41
Uuuuuund da sind wir dann im "soll-man-nicht-machen-Land". update und update_idletasks sollte man nicht selbst aufrufen. Sondern den mainloop betreten, und after verwenden.
https://stackoverflow.com/questions/291 ... g-mainloop
"""
What's wrong with update? There are several answers. First, it tends to complicate the code of the surrounding GUI. If you work the exercises in the Countdown program, you'll get a feel for how much easier it can be when each event is processed on its own callback. Second, it's a source of insidious bugs. The general problem is that executing [update] has nearly unconstrained side effects; on return from [update], a script can easily discover that the rug has been pulled out from under it. There's further discussion of this phenomenon over at Update considered harmful.
"""
Damit zu arbeiten kann also zu subtilen Fehlern fuehren, bis hin zu abstuerzen.
Wir haben hier und and 1000 anderen stellen gesagt, wie es geht. Das Problem von jks ist nix besonderes, das da ein anderes als die vorgestellten Loesungen verlangt - nur sein Verstaendnis ist halt nicht da.
https://stackoverflow.com/questions/291 ... g-mainloop
"""
What's wrong with update? There are several answers. First, it tends to complicate the code of the surrounding GUI. If you work the exercises in the Countdown program, you'll get a feel for how much easier it can be when each event is processed on its own callback. Second, it's a source of insidious bugs. The general problem is that executing [update] has nearly unconstrained side effects; on return from [update], a script can easily discover that the rug has been pulled out from under it. There's further discussion of this phenomenon over at Update considered harmful.
"""
Damit zu arbeiten kann also zu subtilen Fehlern fuehren, bis hin zu abstuerzen.
Wir haben hier und and 1000 anderen stellen gesagt, wie es geht. Das Problem von jks ist nix besonderes, das da ein anderes als die vorgestellten Loesungen verlangt - nur sein Verstaendnis ist halt nicht da.