forked from geraldspreer/the-maker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makerErrorHandler.py
executable file
·47 lines (26 loc) · 1012 Bytes
/
makerErrorHandler.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import makerController
import makerErrorReport
import makerBugReport
class Controller(makerController.SuperController):
def drawDialog(self):
self.dialog = makerErrorReport.xrcErrorDialog(self.view)
self.dialog.Cancel.Bind(self.view.wx.EVT_BUTTON,
self.close)
self.dialog.Report.Bind(self.view.wx.EVT_BUTTON,
self.report)
def write(self, text):
if not self.dialog:
self.drawDialog()
print text
self.dialog.ErrorText.AppendText(text)
self.dialog.Show()
def close(self, event):
self.dialog.Close()
def report(self, event):
makerBugReport.report()
class ErrorHandler:
def __init__(self, mainView):
self.controller = Controller(self, mainView)
self.controller.drawDialog()
def write(self, text):
self.controller.write(text)