/[papo]/gnue/designer/src/Debugger.py
ViewVC logotype

Diff of /gnue/designer/src/Debugger.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by charlie, Tue Aug 27 18:15:52 2002 UTC revision 1.4 by styxman, Fri Nov 8 16:46:03 2002 UTC
# Line 37  from gnue.forms.uidrivers.wx import UIdr Line 37  from gnue.forms.uidrivers.wx import UIdr
37  class DebugSession:  class DebugSession:
38    def __init__(self, caller):    def __init__(self, caller):
39      self.caller = caller      self.caller = caller
40      outputWindow = wxFrame(caller, -1, "Console Output",      outputWindow = wxFrame(caller, -1, _("Console Output"),
41           size=wxSize(300,50))           size=wxSize(300,50))
42      outputWindow.text = wxTextCtrl(outputWindow, -1, style=wxTE_MULTILINE)      outputWindow.text = wxTextCtrl(outputWindow, -1, style=wxTE_MULTILINE)
43      outputWindow.Show(true)      outputWindow.Show(true)
# Line 50  class DebugSession: Line 50  class DebugSession:
50        self._saveexit = sys.exit        self._saveexit = sys.exit
51        sys.exit = self.debugClosing        sys.exit = self.debugClosing
52        debugInstance = DebugInstance(caller._app)        debugInstance = DebugInstance(caller._app)
53        debugInstance.setForm(GFParser.loadForm(StringIO(caller.rootObject.dumpXML(treeDump=1)), debugInstance))        debugInstance.setForm(GFParser.loadFile(StringIO(caller.rootObject.dumpXML(treeDump=1)), debugInstance))
54        debugInstance.activate()        debugInstance.activate()
55        debugInstance._ui._debuginstance = self        debugInstance._ui._debuginstance = self
56      except:      except:
57        self.sanityCheck()        self.sanityCheck()
58        raise        raise
59        self.outputWindow.text.AppendText('\n---- Form Closed Abruptly ----')        self.outputWindow.text.AppendText(_('\n---- Form Closed Abruptly ----'))
60    
61    def debugClosing(self):    def debugClosing(self):
62      self.sanityCheck()      self.sanityCheck()
63      self.outputWindow.text.AppendText('\n---- Form Closed ----')      self.outputWindow.text.AppendText(_('\n---- Form Closed ----'))
64    
65    def sanityCheck(self):    def sanityCheck(self):
66      self.stdoutcatcher.restore()      self.stdoutcatcher.restore()

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26