[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - widget.py:1.41

Richard Jones richard@commonground.com.au
Mon, 14 Jul 2003 20:58:23 -0400


Update of /cvs-repository/Zope3/src/zope/app/browser/form
In directory cvs.zope.org:/tmp/cvs-serv24045

Modified Files:
	widget.py 
Log Message:
we should be generating ObjectModifiedEvent and ObjectCreatedEvent in ObjectWidget

=== Zope3/src/zope/app/browser/form/widget.py 1.40 => 1.41 ===
--- Zope3/src/zope/app/browser/form/widget.py:1.40	Mon Jul 14 11:28:23 2003
+++ Zope3/src/zope/app/browser/form/widget.py	Mon Jul 14 20:58:18 2003
@@ -1089,7 +1089,8 @@
             self.context.value_type.validate(value)
         return self._type(sequence)
 
-    # XXX applyChanges isn't reporting "change" correctly
+    # XXX applyChanges isn't reporting "change" correctly (we're
+    # re-generating the sequence with every edit, and need to be smarter)
     def applyChanges(self, content):
         field = self.context
         value = self.getData()
@@ -1261,9 +1262,11 @@
         # create our new object value
         value = field.query(content, None)
         if value is None:
+            # XXX ObjectCreatedEvent here would be nice
             value = self.factory()
 
         # apply sub changes, see if there *are* any changes
+        # XXX ObjectModifiedEvent here would be nice
         changes = applyWidgetsChanges(self, value, field.schema,
             names=self.names, exclude_readonly=True)