Code corrections
authorlbessard
Tue, 04 Sep 2007 17:47:46 +0200
changeset 266 8678a3cf7fe7
parent 265 36cc4c87cdaa
child 267 96c688ebcde7
Code corrections
objdictgen/commondialogs.py
objdictgen/subindextable.py
--- a/objdictgen/commondialogs.py	Tue Sep 04 17:47:04 2007 +0200
+++ b/objdictgen/commondialogs.py	Tue Sep 04 17:47:46 2007 +0200
@@ -118,7 +118,7 @@
               id=ID_COMMUNICATIONDIALOGPOSSIBLEINDEXES,
               name='PossibleIndexes', parent=self, pos=wx.Point(0, 0), 
               size=wx.Size(0, 0), style=wx.LB_EXTENDED)
-        self.PossibleIndexes.Bind(wx.EVT_LEFT_DCLICK, self.OnPossibleIndexesDClick,
+        self.Bind(wx.EVT_LISTBOX_DCLICK, self.OnPossibleIndexesDClick,
               id=ID_COMMUNICATIONDIALOGPOSSIBLEINDEXES)
 
         self.Select = wx.Button(id=ID_COMMUNICATIONDIALOGSELECT, label='>>',
@@ -142,7 +142,7 @@
               id=ID_COMMUNICATIONDIALOGCURRENTINDEXES, name='CurrentIndexes',
               parent=self, pos=wx.Point(0, 0), size=wx.Size(0, 0), 
               style=wx.LB_EXTENDED)
-        self.CurrentIndexes.Bind(wx.EVT_LEFT_DCLICK, self.OnCurrentIndexesDClick,
+        self.Bind(wx.EVT_LISTBOX_DCLICK, self.OnCurrentIndexesDClick,
               id=ID_COMMUNICATIONDIALOGCURRENTINDEXES)
 
         self.ButtonSizer = self.CreateButtonSizer(wx.OK|wx.CANCEL)
--- a/objdictgen/subindextable.py	Tue Sep 04 17:47:04 2007 +0200
+++ b/objdictgen/subindextable.py	Tue Sep 04 17:47:46 2007 +0200
@@ -91,12 +91,8 @@
 
     def GetValue(self, row, col):
         if row < self.GetNumberRows():
-            value = self.data[row].get(self.GetColLabelValue(col), "")
-            if (type(value) == UnicodeType):
-                return value
-            else: 
-                return str(value)
-    
+            return str(self.data[row].get(self.GetColLabelValue(col), ""))
+            
     def GetEditor(self, row, col):
         if row < self.GetNumberRows():
             return self.editors[row].get(self.GetColLabelValue(col), "")