[Checkins] SVN: zope.app.form/trunk/src/zope/app/form/__init__.py Simplify the last commit, actually you don't want to change the title of the context when changing the label of the widget instance

Hanno Schlichting hannosch at hannosch.eu
Sun May 24 15:42:46 EDT 2009


Log message for revision 100343:
  Simplify the last commit, actually you don't want to change the title of the context when changing the label of the widget instance
  

Changed:
  U   zope.app.form/trunk/src/zope/app/form/__init__.py

-=-
Modified: zope.app.form/trunk/src/zope/app/form/__init__.py
===================================================================
--- zope.app.form/trunk/src/zope/app/form/__init__.py	2009-05-24 19:37:20 UTC (rev 100342)
+++ zope.app.form/trunk/src/zope/app/form/__init__.py	2009-05-24 19:42:46 UTC (rev 100343)
@@ -37,31 +37,9 @@
         self.context = context
         self.request = request
         self.name = self._prefix + context.__name__
+        self.label = self.context.title
+        self.hint = self.context.description
 
-    def get_label(self):
-        """The widget label.
-
-        This read-write attribute defaults to the title of the context.
-        """
-        return self.context.title
-
-    def set_label(self, value):
-        self.context.title = value
-
-    label = property(get_label, set_label)
-
-    def get_hint(self):
-        """A hint regarding the use of the widget.
-
-        This read-write attribute defaults to the description of the context.
-        """
-        return self.context.description
-
-    def set_hint(self, value):
-        self.context.description = value
-
-    hint = property(get_hint, set_hint)
-
     def _translate(self, text):
         return translate(text, context=self.request, default=text)
 



More information about the Checkins mailing list