Open grasshopper139 opened 3 years ago
As a workaround I solved this by overriding the edit method:
def beforeEditing(self):
try:
some_API_call()
self._destroyMe = False
except something:
self.parentApp.setNextForm('MAIN')
self._destroyMe = True
def edit(self):
if not self._destroyMe:
return super().edit()
I have a form that does some API calls before calling the editing loop. If an exception is thrown, I want the parentApp to immediately switch to the MAIN form, however, it simply ignores the form switch and continues on with the method.