dabo Commit
Revision 4431
Date: 2008-08-21 12:10:57 -0700 (Thu, 21 Aug 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4431
Changed:
U trunk/dabo/ui/uiwx/dControlItemMixin.py
Log:
None is a valid value for multiple-selectable controls such as dRadioList. In
this case, select nothing.
Diff:
Modified: trunk/dabo/ui/uiwx/dControlItemMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dControlItemMixin.py 2008-08-21 16:57:19 UTC (rev
4430)
+++ trunk/dabo/ui/uiwx/dControlItemMixin.py 2008-08-21 19:10:57 UTC (rev
4431)
@@ -219,13 +219,15 @@
except ValueError:
invalidSelections.append(key)
+ if len(value) == 0 or (self._isMultiSelect() and
invalidSelections == [None]):
+ # Value being set to an empty tuple, list, or
dict, or to None in a Multi-Select control,
+ # which means "nothing is selected":
+ self._resetChoices()
+ invalidSelections = []
+
if invalidSelections:
raise ValueError, _("Trying to set %s.Value to
these invalid selections: %s") % (self.Name, invalidSelections)
- if len(value) == 0:
- # Value being set to an empty tuple, list, or
dict, which means "nothing is selected":
- self._resetChoices()
-
self._afterValueChanged()
else:
self._properties["KeyValue"] = value
_______________________________________________
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/[EMAIL PROTECTED]