[Zope3-checkins] CVS: Zope3/src/zope/app/form - widget.py:1.10.4.4
Garrett Smith
garrett at mojave-corp.com
Sun Feb 8 23:29:07 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/form
In directory cvs.zope.org:/tmp/cvs-serv10762/src/zope/app/form
Modified Files:
Tag: ozzope-widgets-branch
widget.py
Log Message:
Created a utility method _renderedValueSet that clarifies the use of
_data_marker.
=== Zope3/src/zope/app/form/widget.py 1.10.4.3 => 1.10.4.4 ===
--- Zope3/src/zope/app/form/widget.py:1.10.4.3 Sat Feb 7 21:52:26 2004
+++ Zope3/src/zope/app/form/widget.py Sun Feb 8 23:29:05 2004
@@ -54,6 +54,14 @@
return (ts.translate(text, "zope", context=self.request) or text)
else:
return text
+
+ def _renderedValueSet(self):
+ """Returns True if the the widget's rendered value has been set.
+
+ This is a convenience method that widgets can use to check whether
+ or not setRenderedValue was called.
+ """
+ return self._data is not self._data_marker
def setPrefix(self, prefix):
if not prefix.endswith("."):
More information about the Zope3-Checkins
mailing list