dabo Commit
Revision 4479
Date: 2008-08-28 11:29:39 -0700 (Thu, 28 Aug 2008)
Author: Paul
Trac: http://svn.dabodev.com/trac/dabo/changeset/4479
Changed:
U trunk/dabo/ui/uiwx/dControlItemMixin.py
Log:
Changed the behavior of dControlItem to not raise ValueError in the case where
the Value is set to None. See the comments in the commit for rationale.
Diff:
Modified: trunk/dabo/ui/uiwx/dControlItemMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dControlItemMixin.py 2008-08-28 11:46:58 UTC (rev
4478)
+++ trunk/dabo/ui/uiwx/dControlItemMixin.py 2008-08-28 18:29:39 UTC (rev
4479)
@@ -224,7 +224,12 @@
except ValueError:
invalidSelections.append(key)
- if len(value) == 0 or (self._isMultiSelect() and
invalidSelections == [None]):
+ ### pkm: getBlankValue() returns None, so if there
isn't a Key for None (the default) the
+ ### update cycle will result in the ValueError,
which isn't friendly default behavior.
+ ### So, I'm making it so that None values in *any*
dControlItem class will be allowed.
+ ### We can discuss whether we should expose a
property to control this behavior or not.
+ #if len(value) == 0 or (self._isMultiSelect() and
invalidSelections == [None]):
+ if len(value) == 0 or 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()
_______________________________________________
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]