def _onitemactivated(self, item, expr, is_valid):
        default_value = self.GetItemText(item, VariablesList.COL_VALUE)[1:]

        if is_valid:
            desc = "The new expression will be evaluated at the debuggee and its value will be set to the item."
            labeltext = "New Expression:"
            style=wx.TE_MULTILINE
        else:
            desc = "The current value of the expression (read only)."
            labeltext = "Current Expression:"
            style=wx.TE_MULTILINE|wx.TE_READONLY

        expr_dialog = ExpressionDialog(self, default_value, "Enter Expression", desc, labeltext, (1000, -1), style)
        pos = self.GetPositionTuple()
        expr_dialog.SetPosition((pos[0] + 50, pos[1] + 50))
        r = expr_dialog.ShowModal()
        if r != wx.ID_OK:
            expr_dialog.Destroy()
            return

        _expr = expr_dialog.get_expression()

        expr_dialog.Destroy()

        _suite = "%s = %s" % (expr, _expr)

        worker = RunProcInThread(self.listtype, self._onitemactivatedcallback,
                                 RpdbDebugger().execute, _suite)
        worker.start()
 def OnExecute(self, event):
     """Execute an expression"""
     desc = _("This code will be executed at the debuggee:")
     expr_dialog = ExpressionDialog(self, u"", _("Enter Code to Execute"),
                                    desc, None, (200, 200))
     pos = self.GetPositionTuple()
     expr_dialog.SetPosition((pos[0] + 50, pos[1] + 50))
     if expr_dialog.ShowModal() == wx.ID_OK:
         _expr = expr_dialog.get_expression()
         worker = RunProcInThread("DbgExec", self._oncodeexecuted,
                                  RpdbDebugger().execute, _expr)
         worker.start()
     expr_dialog.Destroy()
    def _onitemactivated(self, item, expr, is_valid):
        default_value = self.GetItemText(item, VariablesList.COL_VALUE)[1:]

        if is_valid:
            desc = "The new expression will be evaluated at the debuggee and its value will be set to the item."
            labeltext = "New Expression:"
            style = wx.TE_MULTILINE
        else:
            desc = "The current value of the expression (read only)."
            labeltext = "Current Expression:"
            style = wx.TE_MULTILINE | wx.TE_READONLY

        expr_dialog = ExpressionDialog(self, default_value, "Enter Expression",
                                       desc, labeltext, (1000, -1), style)
        pos = self.GetPositionTuple()
        expr_dialog.SetPosition((pos[0] + 50, pos[1] + 50))
        r = expr_dialog.ShowModal()
        if r != wx.ID_OK:
            expr_dialog.Destroy()
            return

        _expr = expr_dialog.get_expression()

        expr_dialog.Destroy()

        _suite = "%s = %s" % (expr, _expr)

        worker = RunProcInThread(self.listtype, self._onitemactivatedcallback,
                                 RpdbDebugger().execute, _suite)
        worker.start()
示例#4
0
 def OnExecute(self, event):
     """Execute an expression"""
     desc = _("This code will be executed at the debuggee:")
     expr_dialog = ExpressionDialog(self, u"", _("Enter Code to Execute"),
                                    desc, None, (200, 200))
     pos = self.GetPositionTuple()
     expr_dialog.SetPosition((pos[0] + 50, pos[1] + 50))
     if expr_dialog.ShowModal() == wx.ID_OK:
         _expr = expr_dialog.get_expression()
         worker = RunProcInThread("DbgExec", self._oncodeexecuted,
                                  RpdbDebugger().execute, _expr)
         worker.start()
     expr_dialog.Destroy()