tkinter-tutorial icon indicating copy to clipboard operation
tkinter-tutorial copied to clipboard

main loop explanation contains false info

Open Akuli opened this issue 4 years ago • 1 comments

"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 avatar Jun 03 '21 22:06 Akuli

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

Akuli avatar Jun 03 '21 22:06 Akuli