Returns True is the window is maybe closed. Can be difficult to tell sometimes NOTE - the call to TKroot.update was taking over 500 ms sometimes so added a flag to bypass the lengthy call. :param quick_quick: If True, then don't use the root.update call, only check the flag
(self, quick_check=None)
| 11593 | self.TKroot = None |
| 11594 | |
| 11595 | def is_closed(self, quick_check=None): |
| 11596 | """ |
| 11597 | Returns True is the window is maybe closed. Can be difficult to tell sometimes |
| 11598 | NOTE - the call to TKroot.update was taking over 500 ms sometimes so added a flag to bypass the lengthy call. |
| 11599 | :param quick_quick: If True, then don't use the root.update call, only check the flags |
| 11600 | :type quick_check: bool |
| 11601 | :return: True if the window was closed or destroyed |
| 11602 | :rtype: (bool) |
| 11603 | """ |
| 11604 | |
| 11605 | if self.TKrootDestroyed or self.TKroot is None: |
| 11606 | return True |
| 11607 | |
| 11608 | # if performing a quick check only, then skip calling tkinter for performance reasons |
| 11609 | if quick_check is True: |
| 11610 | return False |
| 11611 | |
| 11612 | # see if can do an update... if not, then it's been destroyed |
| 11613 | try: |
| 11614 | rc = self.TKroot.update() |
| 11615 | except: |
| 11616 | return True |
| 11617 | return False |
| 11618 | |
| 11619 | def _auto_save_location(self): |
| 11620 | """ |
no test coverage detected