New Form Function - CloseNonBlockingForm, fix for context managers
Previously an exception within the "with" block was not correctly passing along exceptions. New function to help with non-blocking forms. For forms that need to be closed that haven't been closed by a button, a new function was needed. CloseNonBlockingForm is the new function.
This commit is contained in:
parent
e2ee6bd9af
commit
951f3f1a6d
|
@ -686,6 +686,10 @@ class FlexForm:
|
|||
self.RootNeedsDestroying = True
|
||||
return results
|
||||
|
||||
def CloseNonBlockingForm(self):
|
||||
self.TKroot.destroy()
|
||||
_my_windows.NumOpenWindows -= 1 * (_my_windows.NumOpenWindows != 0) # decrement if not 0
|
||||
|
||||
def OnClosingCallback(self):
|
||||
return
|
||||
|
||||
|
@ -694,7 +698,7 @@ class FlexForm:
|
|||
|
||||
def __exit__(self, *a):
|
||||
self.__del__()
|
||||
return self
|
||||
return False
|
||||
|
||||
def __del__(self):
|
||||
for row in self.Rows:
|
||||
|
|
Loading…
Reference in New Issue