Update of /cvsroot/pythoncard/PythonCard
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7256
Modified Files:
debug.py
Log Message:
renamed cantmodify to cantModify
made checkItems, popItems, cantModify attributes of self to avoid
duplicate lists
added userdata to list of items not to eval, userdata is just a string
Index: debug.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/debug.py,v
retrieving revision 1.133
retrieving revision 1.134
diff -C2 -d -r1.133 -r1.134
*** debug.py 3 Oct 2004 18:53:22 -0000 1.133
--- debug.py 3 Oct 2004 19:21:33 -0000 1.134
***************
*** 181,184 ****
--- 181,191 ----
bg = self.parentApp.getCurrentBackground()
bg.components.addChangeEventListener(self)
+
+
+ self.checkItems = ['enabled', 'visible', 'editable', 'checked', 'default', 'rules', 'labels', 'ticks', 'horizontalScrollbar']
+ self.popItems = ['layout', 'border', 'style', 'alignment', 'stringSelection']
+ self.cantModify = ['id', 'name', 'alignment', 'layout', 'style', 'border', 'horizontalScrollbar', \
+ 'min', 'max', 'columns', 'rules', 'labels', 'ticks']
+
wx.EVT_CLOSE(self, self.onCloseMe)
wx.StaticText(panel, -1, 'Name : Class', wx.Point(3, 3))
***************
*** 293,308 ****
# could be used at runtime?
def onSelectUpdate(self, evt):
- # make these attributes of self, since they are duplicated below in displayProperty
- checkItems = ['enabled', 'visible', 'editable', 'checked', 'default']
- popItems = ['layout', 'border', 'style', 'alignment']
- cantmodify = ['id', 'name', 'alignment', 'layout', 'style', 'border' ]
-
wName, wClass = self.wComponentList.GetStringSelection().split(" : ")
propName = self.wPropertyList.GetStringSelection()
! if propName not in cantmodify:
! if propName in checkItems:
value = self.wChecked.GetValue()
! elif propName in popItems:
value = self.wPop.GetStringSelection()
elif wClass == 'TextArea' and propName == 'text':
--- 300,310 ----
# could be used at runtime?
def onSelectUpdate(self, evt):
wName, wClass = self.wComponentList.GetStringSelection().split(" : ")
propName = self.wPropertyList.GetStringSelection()
! if propName not in self.cantModify:
! if propName in self.checkItems:
value = self.wChecked.GetValue()
! elif propName in self.popItems:
value = self.wPop.GetStringSelection()
elif wClass == 'TextArea' and propName == 'text':
***************
*** 368,387 ****
def displayProperty(self, wName, wClass, propName):
- checkItems = ['enabled', 'visible', 'editable', 'checked', 'default', 'rules']
- popItems = ['layout', 'border', 'style', 'alignment', 'stringSelection']
- cantmodify = ['id', 'name', 'alignment', 'layout', 'style', 'border' ]
-
self.wName.SetLabel(propName + ":")
widget = self.parentApp.getCurrentBackground().components[wName]
! if propName in ['label', 'text', 'toolTip'] or propName in checkItems:
value = getattr(widget, propName)
else:
value = str(getattr(widget, propName))
! if propName in checkItems:
self.hideAllBut(self.wChecked)
self.wChecked.Show(1)
self.wChecked.SetValue(int(value))
! elif propName in popItems:
self.hideAllBut(self.wPop)
self.wPop.Show(1)
--- 370,385 ----
def displayProperty(self, wName, wClass, propName):
self.wName.SetLabel(propName + ":")
widget = self.parentApp.getCurrentBackground().components[wName]
! if propName in ['label', 'text', 'toolTip'] or propName in self.checkItems:
value = getattr(widget, propName)
else:
value = str(getattr(widget, propName))
! if propName in self.checkItems:
self.hideAllBut(self.wChecked)
self.wChecked.Show(1)
self.wChecked.SetValue(int(value))
! elif propName in self.popItems:
self.hideAllBut(self.wPop)
self.wPop.Show(1)
***************
*** 417,421 ****
# this should only display if the attribute is settable
# so name, alignment, and others are read-only
! self.wUpdate.Show((propName not in cantmodify) and not (propName == 'items' and wClass == 'RadioGroup'))
def onSelectComponentListEvent(self, evt):
--- 415,419 ----
# this should only display if the attribute is settable
# so name, alignment, and others are read-only
! self.wUpdate.Show((propName not in self.cantModify) and not (propName == 'items' and wClass == 'RadioGroup'))
def onSelectComponentListEvent(self, evt):
|