dabo Commit
Revision 3958
Date: 2008-03-18 12:17:42 -0700 (Tue, 18 Mar 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/3958
Changed:
U trunk/dabo/ui/uiwx/dGridSizer.py
Log:
If invalid strings are passed to setColExpand() or setRowExpand(), an exception
will be raised instead of having it fail silently.
Diff:
Modified: trunk/dabo/ui/uiwx/dGridSizer.py
===================================================================
--- trunk/dabo/ui/uiwx/dGridSizer.py 2008-03-17 18:43:01 UTC (rev 3957)
+++ trunk/dabo/ui/uiwx/dGridSizer.py 2008-03-18 19:17:42 UTC (rev 3958)
@@ -179,6 +179,9 @@
if colNum.lower() == "all":
for col in xrange(self.HighCol+1):
self.setColExpand(expand, col,
proportion)
+ else:
+ raise ValueError,
+ _("Invalid value passed for
'colNum' parameter: '%s'. Only column numbers or the word 'all' are valid.") %
colNum
else:
curr = self.getColExpand(colNum)
self._colExpandState[colNum] = expand
@@ -202,6 +205,9 @@
if rowNum.lower() == "all":
for row in xrange(self.HighRow+1):
self.setRowExpand(expand, row,
proportion)
+ else:
+ raise ValueError,
+ _("Invalid value passed for
'rowNum' parameter: '%s'. Only row numbers or the word 'all' are valid.") %
rowNum
else:
curr = self.getRowExpand(rowNum)
self._rowExpandState[rowNum] = expand
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]