Akuli / tkinter-tutorial

Tkinter tutorial for beginners.
Other
121 stars 25 forks source link

main loop explanation contains false info #5

Open Akuli opened 3 years ago

Akuli commented 3 years ago

"When a tkinter program is running, Tk needs to process different kinds of events. ... Tk and most other GUI toolkits do that by simply checking for any new events over and over again, many times every second."

They actually wait for the next event. It's simpler than what I'm explaining.

Akuli commented 3 years ago
<Akuli> but yeah, it's a loop, basically like this
<Akuli> while True:
<Akuli>     event = wait_for_event()
<Akuli>     do_something(event)