def OnNewTestCase(self, event): dlg = TestCaseNameDialog(self.controller) if dlg.ShowModal() == wx.ID_OK: self.controller.execute(AddTestCase(dlg.get_name())) dlg.Destroy()