[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/form/browser/textwidgets.py MAke explanatory statement.

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Jul 9 11:47:06 EDT 2004


Log message for revision 26352:

MAke explanatory statement.




-=-
Modified: Zope3/trunk/src/zope/app/form/browser/textwidgets.py
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/textwidgets.py	2004-07-09 15:47:04 UTC (rev 26351)
+++ Zope3/trunk/src/zope/app/form/browser/textwidgets.py	2004-07-09 15:47:06 UTC (rev 26352)
@@ -133,10 +133,14 @@
         if self.convert_missing_value and input == self._missing:
             value = self.context.missing_value
         else:
+            # We convert everything to unicode. This might seem a bit crude,
+            # but anything contained in a TextWidget should be representable
+            # as a string. Note that you always have the choice of overriding
+            # the method.  
             try:
                 value = unicode(input)
             except ValueError, v:
-                raise ConversionError("Invalid integer data", v)
+                raise ConversionError("Invalid text data", v)
         return decode_html(value)
 
 



More information about the Zope3-Checkins mailing list