Changeset 4186
- Timestamp:
- 06/26/08 06:13:13 (5 months ago)
- Files:
-
- trunk/dabo/ui/__init__.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/__init__.py (modified) (13 diffs)
- trunk/dabo/ui/uiwx/concordance.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dBorderSizer.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dButton.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dCheckBox.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dColorDialog.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dControlItemMixin.py (modified) (3 diffs)
- trunk/dabo/ui/uiwx/dControlMixin.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dDateTextBox.py (modified) (4 diffs)
- trunk/dabo/ui/uiwx/dDialog.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dDockForm.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dEditor.py (modified) (14 diffs)
- trunk/dabo/ui/uiwx/dFoldPanelBar.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dFont.py (modified) (2 diffs)
- trunk/dabo/ui/uiwx/dForm.py (modified) (2 diffs)
- trunk/dabo/ui/uiwx/dFormMixin.py (modified) (7 diffs)
- trunk/dabo/ui/uiwx/dGrid.py (modified) (26 diffs)
- trunk/dabo/ui/uiwx/dGridSizer.py (modified) (4 diffs)
- trunk/dabo/ui/uiwx/dHtmlBox.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dHyperLink.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dImage.py (modified) (2 diffs)
- trunk/dabo/ui/uiwx/dKeys.py (modified) (2 diffs)
- trunk/dabo/ui/uiwx/dListControl.py (modified) (2 diffs)
- trunk/dabo/ui/uiwx/dMenu.py (modified) (6 diffs)
- trunk/dabo/ui/uiwx/dPage.py (modified) (2 diffs)
- trunk/dabo/ui/uiwx/dPageFrameMixin.py (modified) (3 diffs)
- trunk/dabo/ui/uiwx/dPageFrameNoTabs.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dPanel.py (modified) (2 diffs)
- trunk/dabo/ui/uiwx/dPdfWindow.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dPemMixin.py (modified) (12 diffs)
- trunk/dabo/ui/uiwx/dRadioList.py (modified) (5 diffs)
- trunk/dabo/ui/uiwx/dSizerMixin.py (modified) (16 diffs)
- trunk/dabo/ui/uiwx/dSpinner.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dSplitter.py (modified) (4 diffs)
- trunk/dabo/ui/uiwx/dStatusBar.py (modified) (1 diff)
- trunk/dabo/ui/uiwx/dTextBoxMixin.py (modified) (3 diffs)
- trunk/dabo/ui/uiwx/dTreeView.py (modified) (20 diffs)
- trunk/dabo/ui/uiwx/uiApp.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dabo/ui/__init__.py
r3810 r4186 175 175 ret = None 176 176 for att in self.__class__._proxyDict[nm]: 177 try: 178 if att == "self": 179 base = getattr(self, "_baseClass", self.__class__) 180 obj = base.__bases__[0] 181 prop = getattr(obj, nm) 182 ret = prop.fget(self) 183 else: 184 obj = getattr(self, att) 185 ret = getattr(obj, nm) 186 break 187 except: 188 continue 177 if att == "self": 178 base = getattr(self, "_baseClass", self.__class__) 179 obj = base.__bases__[0] 180 prop = getattr(obj, nm) 181 ret = prop.fget(self) 182 else: 183 obj = getattr(self, att) 184 ret = getattr(obj, nm) 185 break 189 186 return ret 190 187 trunk/dabo/ui/uiwx/__init__.py
r4172 r4186 148 148 try: 149 149 from dLinePlot import dLinePlot 150 except :150 except ImportError: 151 151 pass 152 152 … … 334 334 # for insertion into the dEvent.EventData dict. 335 335 d = dir(wxEvt) 336 try: 337 upPems = [p for p in d if p[0].isupper()] 338 for pem in upPems: 339 if pem in ("Skip", "Clone", "Destroy", "Button", "ButtonIsDown", 340 "GetLogicalPosition", "ResumePropagation", "SetEventObject", 341 "SetEventType", "SetId", "SetExtraLong", "SetInt", "SetString", 342 "SetTimestamp", "StopPropagation"): 343 continue 344 try: 345 pemName = pem[0].lower() + pem[1:] 346 ed[pemName] = eval("wxEvt.%s()" % pem) 347 except: 348 pass 349 except: 350 pass 336 upPems = [p for p in d if p[0].isupper()] 337 for pem in upPems: 338 if pem in ("Skip", "Clone", "Destroy", "Button", "ButtonIsDown", 339 "GetLogicalPosition", "ResumePropagation", "SetEventObject", 340 "SetEventType", "SetId", "SetExtraLong", "SetInt", "SetString", 341 "SetTimestamp", "StopPropagation"): 342 continue 343 try: 344 pemName = pem[0].lower() + pem[1:] 345 ed[pemName] = eval("wxEvt.%s()" % pem) 346 except AttributeError: 347 pass 351 348 352 349 if isinstance(wxEvt, (wx.SplitterEvent,) ): 353 350 try: 354 351 ed["mousePosition"] = (wxEvt.GetX(), wxEvt.GetY()) 355 except :352 except AttributeError: 356 353 ed["mousePosition"] = wx.GetMousePosition() 357 354 … … 378 375 try: 379 376 ed["col"] = wxEvt.GetColumn() 380 except :377 except AttributeError: 381 378 pass 382 379 … … 395 392 try: 396 393 ed["mousePosition"] = wxEvt.GetPoint().Get() 397 except: pass 394 except AttributeError: 395 pass 398 396 # See if it's a menu selection 399 397 obj = wxEvt.GetEventObject() … … 450 448 ed["itemID"] = wxEvt.GetItem() 451 449 ed["itemNode"] = tree.find(ed["itemID"])[0] 452 except :450 except (AttributeError, IndexError): 453 451 pass 454 452 … … 456 454 try: 457 455 ed["sashPosition"] = wxEvt.GetSashPosition() 458 except :456 except AttributeError: 459 457 ed["sashPosition"] = wxEvt.GetEventObject().SashPosition 460 458 if wxEvt.GetEventType() == wx.EVT_SPLITTER_UNSPLIT.evtType[0]: 461 459 try: 462 460 ed["windowRemoved"] = wxEvt.GetWindowBeingRemoved() 463 except :461 except AttributeError: 464 462 ed["windowRemoved"] = None 465 463 … … 485 483 # Don't think this is implemented yet 486 484 ed["commandDown"] = wxEvt.CmdDown() 487 except: pass 485 except AttributeError: 486 pass 488 487 489 488 if isinstance(wxEvt, wx.grid.GridSizeEvent): … … 501 500 # Don't think this is implemented yet 502 501 ed["commandDown"] = wxEvt.CmdDown() 503 except: pass 502 except AttributeError: 503 pass 504 504 505 505 if isinstance(wxEvt, wx.calendar.CalendarEvent): … … 517 517 if isinstance(wxEvt, wx.html.HtmlLinkEvent): 518 518 ed["href"] = wxEvt.href 519 except :519 except AttributeError: 520 520 # wxPython 2.6 and earlier doesn't seem to have this event 521 521 pass … … 831 831 try: 832 832 mm, dd, yy = dt.month, dt.day, dt.year 833 except :833 except AttributeError: 834 834 dabo.errorLog.write(_("Invalid date value passed to getDate(): %s") % dt) 835 835 return None … … 1213 1213 try: 1214 1214 cap = "Browse: %s" % dataSource.Table 1215 except :1215 except AttributeError: 1216 1216 cap = "Browse" 1217 1217 else: … … 1306 1306 try: 1307 1307 txt = wind.Caption 1308 except :1308 except AttributeError: 1309 1309 raise ValueError, "No text supplied to fontMetric call" 1310 1310 fnt = wind.GetFont() … … 1321 1321 try: 1322 1322 wind = wind.Form 1323 except :1323 except AttributeError: 1324 1324 try: 1325 1325 wind = wind.Parent 1326 except :1326 except AttributeError: 1327 1327 pass 1328 1328 dc = wx.ClientDC(wind) trunk/dabo/ui/uiwx/concordance.py
r3054 r4186 15 15 for mro in daboClass.__mro__: 16 16 if "<class 'wx." in str(mro): 17 try: 18 if "wx._" in str(mro): 19 # normal wx class: don't include the wx._controls. cruft 20 dabo_to_wx[daboName] = "wx.%s" % str(mro).split(".")[-1][:-2] 21 else: 22 # extra class: give the full story: 23 dabo_to_wx[daboName] = str(mro)[8:-2] 24 except: 25 pass 17 if "wx._" in str(mro): 18 # normal wx class: don't include the wx._controls. cruft 19 dabo_to_wx[daboName] = "wx.%s" % str(mro).split(".")[-1][:-2] 20 else: 21 # extra class: give the full story: 22 dabo_to_wx[daboName] = str(mro)[8:-2] 26 23 break 27 24 trunk/dabo/ui/uiwx/dBorderSizer.py
r3303 r4186 24 24 box, orientation = orientation, box 25 25 if not isinstance(box, dabo.ui.dBox): 26 try: 27 prnt = box 28 box = dabo.ui.dBox(prnt) 29 box.sendToBack() 30 except: 31 raise dException.dException, "Must pass an instance of dBox or a parent object to dBorderSizer" 26 prnt = box 27 box = dabo.ui.dBox(prnt) 28 box.sendToBack() 32 29 # Convert Dabo orientation to wx orientation 33 30 orient = self._extractKey((kwargs, properties), "Orientation", orientation) trunk/dabo/ui/uiwx/dButton.py
r3303 r4186 99 99 try: 100 100 db = child.DefaultButton 101 except :101 except AttributeError: 102 102 db = False 103 103 if db: trunk/dabo/ui/uiwx/dCheckBox.py
r3980 r4186 93 93 try: 94 94 state = self._ValueTo3State[val] 95 except :95 except KeyError: 96 96 state = False 97 97 self.Set3StateValue(state) trunk/dabo/ui/uiwx/dColorDialog.py
r3054 r4186 19 19 color = dColors.colorTupleFromName(color) 20 20 dat.SetColour(color) 21 except: pass 21 except KeyError: 22 pass 22 23 elif isinstance(color, tuple): 23 24 dat.SetColour(color) trunk/dabo/ui/uiwx/dControlItemMixin.py
r4134 r4186 222 222 try: 223 223 self.setSelection(self.Keys.index(key)) 224 except :224 except IndexError: 225 225 # No such key; write an info message, but otherwise ignore it. 226 226 dabo.infoLog.write(_("Key '%s' not found") % key) … … 259 259 try: 260 260 self._setSelection(index) 261 except: pass 261 except IndexError: 262 pass 262 263 self._afterValueChanged() 263 264 else: … … 308 309 try: 309 310 strings.append(self.GetString(index)) 310 except :311 except IndexError: 311 312 # If this is a list control, there is no native GetString. 312 313 # Use the Dabo-supplied replacement 313 314 try: 314 315 strings.append(self._GetString(index)) 315 except :316 except IndexError: 316 317 # Invalid index; usually an empty list 317 318 pass trunk/dabo/ui/uiwx/dControlMixin.py
r3998 r4186 22 22 # Hide a problem on Windows toolbars where a single command event will 23 23 # be raised up to three separate times. 24 # print "CONTROL WXHIT", self, evt 24 25 now = time.time() 25 26 if not hasattr(self, "_lastHitTime") or (now - self._lastHitTime) > .001: 26 27 self.raiseEvent(dEvents.Hit, evt, *args, **kwargs) 28 # print "CONTROL RAISING HIT" 27 29 self._lastHitTime = time.time() 28 30 trunk/dabo/ui/uiwx/dDateTextBox.py
r3954 r4186 125 125 try: 126 126 self.calPanel.cal.Date = self.Value 127 except :127 except AttributeError: 128 128 self.calPanel = CalPanel(self.Parent, dt=self.Value, ctrl=self) 129 129 cp = self.calPanel … … 159 159 else: 160 160 key = {8: "h", 13: "m", 19: "s"}[evt.keyCode] 161 except :161 except KeyError: 162 162 # spurious key event; ignore 163 163 return … … 207 207 if newVal != val: 208 208 self.Value = newVal 209 except: pass 209 except ValueError: 210 pass 210 211 211 212 … … 368 369 self.Value = self.Value.replace(year=yr, month=mn, day=dy) 369 370 ok = True 370 except :371 except ValueError: 371 372 dy -= 1 372 373 trunk/dabo/ui/uiwx/dDialog.py
r4170 r4186 121 121 """ 122 122 if self.Application is not None: 123 try: 124 self.Application.uiForms.remove(self) 125 except: pass 123 self.Application.uiForms.remove(self) 126 124 super(dDialog, self).release() 127 125 trunk/dabo/ui/uiwx/dDockForm.py
r4079 r4186 254 254 try: 255 255 return self._caption 256 except :256 except AttributeError: 257 257 self._caption = "" 258 258 return self._caption trunk/dabo/ui/uiwx/dEditor.py
r4152 r4186 514 514 number. If the position is invalid, returns -1. 515 515 """ 516 try: 517 ret = self.LineFromPosition(pos) 518 except: 519 ret = -1 520 return ret 521 522 516 return self.LineFromPosition(pos) 517 518 523 519 def getPositionFromLine(self, linenum): 524 520 """Given a line number, returns the position of the start of that line. 525 521 If the line number is invalid, returns -1.""" 526 try: 527 ret = self.PositionFromLine(linenum) 528 except: 529 ret = -1 530 return ret 522 return self.PositionFromLine(linenum) 531 523 532 524 … … 828 820 try: 829 821 newSize = int(fontSize) 830 except :822 except ValueError: 831 823 dabo.errorLog.write(_("Invalid value passed to changeFontSize: %s") % fontSize) 832 824 return … … 1169 1161 del args[0][0] 1170 1162 args = inspect.formatargspec(args[0], args[1], args[2], args[3]) 1171 except :1163 except IndexError: 1172 1164 args = "" 1173 1165 1174 try: 1175 if inspect.ismethod(obj): 1176 funcType = "Method" 1177 elif inspect.isfunction(obj): 1178 funcType = "Function" 1179 elif inspect.isclass(obj): 1180 funcType = "Class" 1181 elif inspect.ismodule(obj): 1182 funcType = "Module" 1183 elif inspect.isbuiltin(): 1184 funcType = "Built-In" 1185 else: 1186 funcType = "" 1187 except: 1166 if inspect.ismethod(obj): 1167 funcType = "Method" 1168 elif inspect.isfunction(obj): 1169 funcType = "Function" 1170 elif inspect.isclass(obj): 1171 funcType = "Class" 1172 elif inspect.ismodule(obj): 1173 funcType = "Module" 1174 elif inspect.isbuiltin(): 1175 funcType = "Built-In" 1176 else: 1188 1177 funcType = "" 1189 1178 1190 1179 doc = "" 1191 try: 1192 docLines = obj.__doc__.splitlines() 1193 for line in docLines: 1194 doc += line.strip() + "\n" ## must be \n on all platforms 1195 doc = doc.strip() ## Remove trailing blank line 1196 except: 1197 pass 1180 docLines = obj.__doc__.splitlines() 1181 for line in docLines: 1182 doc += line.strip() + "\n" ## must be \n on all platforms 1183 doc = doc.strip() ## Remove trailing blank line 1198 1184 1199 1185 try: 1200 1186 name = obj.__name__ 1201 except :1187 except AttributeError: 1202 1188 name = "" 1203 1189 1204 shortDoc = "%s %s%s" % (funcType, 1205 name, 1206 args) 1207 1190 shortDoc = "%s %s%s" % (funcType, name, args) 1208 1191 longDoc = "%s\n\n%s" % (shortDoc, doc) 1209 1192 … … 1345 1328 try: 1346 1329 fname = self._fileName 1347 except :1330 except AttributeError: 1348 1331 fname = None 1349 1332 if fname is None or fname is "": … … 1360 1343 try: 1361 1344 drct = self._curdir 1362 except :1345 except AttributeError: 1363 1346 drct = "" 1364 1347 else: … … 1407 1390 try: 1408 1391 fname = self._fileName 1409 except :1392 except AttributeError: 1410 1393 fname = self._newFileName 1411 1394 … … 1419 1402 try: 1420 1403 open(fname, "wb").write(self.GetText().encode(self.Encoding)) 1421 except :1404 except OSError: 1422 1405 dabo.ui.stop("Could not save %s. Please check your write permissions." % fname) 1423 1406 return False … … 1517 1500 text = f.read().decode(self.Encoding) 1518 1501 f.close() 1519 except :1502 except OSError: 1520 1503 if os.path.exists(fileSpec): 1521 1504 dabo.ui.stop("Could not open %s. Please check that you have read permissions." % fileSpec) … … 1633 1616 for attr in dir(obj): 1634 1617 attr = '%s%s'%(word,attr) 1635 if attr not in words: words.append(attr) 1636 except: 1618 if attr not in words: 1619 words.append(attr) 1620 except IndexError: 1637 1621 pass 1638 1622 elif word[-1] in " ()[]{}": … … 1641 1625 if words: 1642 1626 words.sort(lambda a,b: cmp(a.upper(), b.upper())) 1643 try: 1644 # For some reason, the STC editor in Windows likes to add icons 1645 # even if they aren't requested. This explicitly removes them. 1646 wds = ["%s?0" % wd for wd in words] 1647 self.AutoCompShow(len(word), " ".join(wds)) 1648 except: 1649 pass 1627 # For some reason, the STC editor in Windows likes to add icons 1628 # even if they aren't requested. This explicitly removes them. 1629 wds = ["%s?0" % wd for wd in words] 1630 self.AutoCompShow(len(word), " ".join(wds)) 1650 1631 1651 1632 … … 1689 1670 def getWordObject(self,word=None,whole=None): 1690 1671 if not word: word=self.getWord(whole=whole) 1691 try: 1692 obj = self.evaluate(word) 1693 return obj 1694 except: 1695 return None 1672 return self.evaluate(word) 1696 1673 # End of auto-completion code 1697 1674 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - … … 1793 1770 try: 1794 1771 o = eval("o.%s" % innerObjectNames) 1795 except :1772 except AttributeError: 1796 1773 o = None 1797 1774 return o … … 2063 2040 self._selectionBackColor = val 2064 2041 if isinstance(val, basestring): 2065 try: 2066 val = dColors.colorTupleFromName(val) 2067 except: pass 2042 val = dColors.colorTupleFromName(val) 2068 2043 self.SetSelBackground(1, val) 2069 2044 else: … … 2088 2063 self._selectionForeColor = val 2089 2064 if isinstance(val, basestring): 2090 try: 2091 val = dColors.colorTupleFromName(val) 2092 except: pass 2065 val = dColors.colorTupleFromName(val) 2093 2066 self.SetSelForeground(1, val) 2094 2067 else: trunk/dabo/ui/uiwx/dFoldPanelBar.py
r3305 r4186 106 106 # Call the Dabo version, if present 107 107 self.Sizer.layout() 108 except :108 except AttributeError: 109 109 pass 110 110 if self.Application.Platform == "Win": trunk/dabo/ui/uiwx/dFont.py
r3638 r4186 56 56 try: 57 57 return self._nativeFont.SetFaceName(val) 58 except :58 except AttributeError: 59 59 return False 60 60 return False … … 110 110 try: 111 111 self._nativeFont.SetPointSize(val) 112 except :112 except ValueError: 113 113 dabo.errorLog.write(_("Setting FontSize to %s failed") % val) 114 114 self._propsChanged() trunk/dabo/ui/uiwx/dForm.py
r4022 r4186 716 716 # This is being called by a regular grid not tied to a bizobj 717 717 rowCount = grid.RowCount 718 rowNumber = grid.CurrentRow +1718 rowNumber = grid.CurrentRow + 1 719 719 else: 720 720 bizobj = self.getBizobj(dataSource) … … 724 724 # store these directly, since they lack bizobjs 725 725 rowCount = self.rowCount 726 rowNumber = self.rowNumber +1727 except :726 rowNumber = self.rowNumber + 1 727 except AttributeError: 728 728 rowCount = 1 729 729 rowNumber = 1 trunk/dabo/ui/uiwx/dFormMixin.py
r4139 r4186 162 162 try: 163 163 restoredSP = self.restoredSP 164 except :164 except AttributeError: 165 165 restoredSP = False 166 166 if not restoredSP: … … 195 195 try: 196 196 restoredSP = self.restoredSP 197 except :197 except AttributeError: 198 198 restoredSP = False 199 199 if restoredSP: … … 204 204 try: 205 205 restoredSP = self.restoredSP 206 except :206 except AttributeError: 207 207 restoredSP = False 208 208 if restoredSP: … … 248 248 249 249 if app is not None: 250 try: 251 self.Application.uiForms.remove(self) 252 except: pass 253 254 250 self.Application.uiForms.remove(self) 251 252 255 253 def activeControlValid(self): 256 254 """ Force the control-with-focus to fire its KillFocus code. … … 495 493 # Call the Dabo version, if present 496 494 self.Sizer.layout() 497 except: pass 495 except AttributeError: 496 pass 498 497 if self.Application.Platform == "Win": 499 498 self.refresh() … … 568 567 569 568 570 def pushStatusText(self, txt ):569 def pushStatusText(self, txt, duration=None): 571 570 """Stores the current text of the StatusBar on a LIFO stack for later retrieval.""" 572 571 self._statusStack.append(self.StatusText) 573 572 self.StatusText = txt 573 if duration is not None: 574 # Pop it after 'duration' seconds 575 dabo.ui.callAfterInterval(1000*duration, self.popStatusText) 574 576 575 577 … … 858 860 try: 859 861 ret = self.GetStatusBar() 860 except :862 except AttributeError: 861 863 # pkm: My client got a TypeError from the wx layer, perhaps because the 862 864 # window is a dialog and not a form, but I can't reproduce on my end. trunk/dabo/ui/uiwx/dGrid.py
r4129 r4186 113 113 try: 114 114 return self.grid.RowLabels[row] 115 except :115 except IndexError: 116 116 return "" 117 117 … … 160 160 try: 161 161 col.DataType = typeDict[col.DataType] 162 except :162 except KeyError: 163 163 # Not one of the standard types. Extract it from 164 164 # the string version of the type 165 165 try: 166 166 col.DataType = str(col.DataType).split("'")[1].lower() 167 except :167 except IndexError: 168 168 # Something's odd. Print an error message and move on. 169 169 dabo.errorLog.write("Unknown data type found in setColumns(): %s" … … 322 322 ret = not self.grid.DataSet[row][field] 323 323 return ret 324 except: pass 324 except (IndexError, KeyError): 325 pass 325 326 return ret 326 327 return True … … 343 344 try: 344 345 ret = self.grid.DataSet[row][field] 345 except :346 except (IndexError, KeyError): 346 347 ret = "" 347 348 if ret is None: … … 570 571 try: 571 572 oldVal = getattr(self, prop) 572 except :573 except AttributeError: 573 574 needRefresh = True 574 575 setattr(self, prop, func(*args, **kwargs)) … … 603 604 line with other Dabo objects. 604 605 """ 605 try: 606 self.Parent.removeColumn(self) 607 except: 608 pass 606 self.Parent.removeColumn(self) 609 607 610 608 … … 751 749 try: 752 750 grid = self.Parent 753 except :751 except AttributeError: 754 752 grid = None 755 753 if grid is not None: … … 1262 1260 try: 1263 1261 v = self._listEditorChoices 1264 except :1262 except AttributeError: 1265 1263 v = [] 1266 1264 return v … … 1311 1309 try: 1312 1310 v = self._searchable 1313 except :1311 except AttributeError: 1314 1312 v = self._searchable = True 1315 1313 return v … … 1325 1323 try: 1326 1324 v = self._sortable 1327 except :1325 except At: 1328 1326 v = self._sortable = True 1329 1327 return v … … 1385 1383 try: 1386 1384 self.Parent.SetColSize(idx, v) 1387 except :1385 except AttributeError: 1388 1386 # The grid may still be in the process of being created, so pass. 1389 1387 pass … … 1879 1877 try: 1880 1878 ret = self._Table.GetValue(row, col) 1881 except :1879 except AttributeError: 1882 1880 ret = super(dGrid, self).GetCellValue(row, col) 1883 1881 return ret … … 1887 1885 try: 1888 1886 ret = self._Table.GetValue(row, col) 1889 except :1887 except AttributeError: 1890 1888 ret = super(dGrid, self).GetValue(row, col) 1891 1889 return ret … … 2116 2114 try: 2117 2115 structure = bizobj.getDataStructureFromDescription() 2118 except :2116 except TypeError: 2119 2117 # Well, that call failed... seems that sqlite doesn't define a cursor 2120 2118 # description? I need to test this out. For now, fall back to the old … … 2140 2138 try: 2141 2139 cap = keyCaption[colKey] 2142 except :2140 except KeyError: 2143 2141 cap = colKey 2144 2142 col = self.addColumn(inBatch=True) … … 2266 2264 try: 2267 2265 self.AutoSizeColumn(colNum, setAsMin=False) 2268 except :2266 except wx.PyAssertionError: 2269 2267 pass 2270 2268 _setColSize(colNum) … … 2936 2934 ## yet it hasn't yet taken effect: force it. 2937 2935 col.Width = col.Width 2938 except :2936 except wx.PyAssertionError: 2939 2937 # If the underlying wx grid doesn't yet know about the column, such 2940 2938 # as when adding columns with inBatch=True, this can throw an error … … 3300 3298 try: 3301 3299 col = self.Columns[newCol] 3302 except :3300 except IndexError: 3303 3301 col = None 3304 3302 … … 3508 3506 except AttributeError: 3509 3507 left = right = evt.GetCol() 3510 try: 3511 if mode == wx.grid.Grid.wxGridSelectRows: 3512 if (top != bott) or (top != origCol): 3513 # Attempting to select a range 3514 if top == origRow: 3515 row = bott 3516 else: 3517 row = top 3518 self.SetGridCursor(row, self._lastCol) 3519
