Kaydet (Commit) 148644d5 authored tarafından Sjoerd Mullender's avatar Sjoerd Mullender

WDB enhancement: Click once on a line with a class instance in the

local or global variables list and you get a window with the instance
variable of the class instance.  This list is of course automatically
kept up to date.
üst 72d73649
......@@ -61,6 +61,30 @@ class FrameWindow(basewin.BaseWindow):
dummy = self.editor.event(WE_COMMAND, \
self.win, detail)
def mouse_down(self, detail):
(h, v), clicks, button, mask = detail
i = v / stdwin.lineheight()
if 5 <= i < len(self.displaylist):
import string
name = string.splitfields(self.displaylist[i],' = ')[0]
if not self.dict.has_key(name):
stdwin.fleep()
return
value = self.dict[name]
if not hasattr(value, '__dict__'):
stdwin.fleep()
return
name = 'instance ' + `value`
if self.debugger.framewindows.has_key(name):
self.debugger.framewindows[name].popup()
else:
self.debugger.framewindows[name] = \
FrameWindow().init(self.debugger,
self.frame, value.__dict__,
name)
return
stdwin.fleep()
def re_eval(self):
import string, repr
expr = string.strip(self.editor.gettext())
......
......@@ -61,6 +61,30 @@ class FrameWindow(basewin.BaseWindow):
dummy = self.editor.event(WE_COMMAND, \
self.win, detail)
def mouse_down(self, detail):
(h, v), clicks, button, mask = detail
i = v / stdwin.lineheight()
if 5 <= i < len(self.displaylist):
import string
name = string.splitfields(self.displaylist[i],' = ')[0]
if not self.dict.has_key(name):
stdwin.fleep()
return
value = self.dict[name]
if not hasattr(value, '__dict__'):
stdwin.fleep()
return
name = 'instance ' + `value`
if self.debugger.framewindows.has_key(name):
self.debugger.framewindows[name].popup()
else:
self.debugger.framewindows[name] = \
FrameWindow().init(self.debugger,
self.frame, value.__dict__,
name)
return
stdwin.fleep()
def re_eval(self):
import string, repr
expr = string.strip(self.editor.gettext())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment