Skip to content

Issue with detecting when a user closes the window #91638

Closed as not planned
Closed as not planned
@Studio-Hawaii

Description

@Studio-Hawaii

there is a problem with tk detection for when you close a window.

if you write the following line of code:
root.protocol("WM_DELETE_WINDOW", function)

Expectation:
The function runs when you try to close the window.

Output:
_init__.py", line 2226, in wm_protocol return self.tk.call( _tkinter.TclError: can't invoke "wm" command: application has been destroyed

This is the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions