Lack of proper modified events and event descriptions in formlib and other places

Reported by Philipp von Weitershausen on 2007-02-20
2
Affects Status Importance Assigned to Milestone
Zope 3
Medium
Philipp von Weitershausen

Bug Description

ObjectModifiedEvent is a general event to indicate some property/ies, whether intrinsic or extrinsic (e.g. in annotations), of an object has changed. In itself an ObjectModifiedEvent is pretty general therefore and hence quite useless to deduct within a subscriber how the object was modified. That's why there is actually support for annotating ObjectModified events with this information:

  info = Attributes(ITheSchema, 'foo', 'bar', 'blergh')
  notify(ObjectModifiedEvent(obj, info))

(Attributes is importable from zope.lifecycleevent). Note that the object must not necessarily provide ITheSchema, it could also be that the ITheSchema(obj) adapter was changed (this is useful when sending modified events for annotation adapters like IZopeDublinCore).

The problem is that Zope itself makes little use of this yet. In particular:

* zope.formlib doens't annotate events with this information, even though it has all that information (which exact properties changed). Interesting enough, zope.app.form *does* annotate the event with the additional info.

* The 'contents.html' view for containers allows you to change the DublinCore Title property, but doesn't send any event whatsoever (it should be sending an ObjecdtModifiedEvent with Attributes(IZopeDublinCore, 'title').

* The 'edit.html' view for zope.app.file's File objects sends ObjectModifiedEvents, but doesn't annotate it with the right kind of information)

There might be other cases lurking around. These are the ones I could find offhand.

These have been fixed in zope.app.container 3.5.3, zope.app.file 3.4.2. zope.formlib 3.5.0 (not yet released) will contain the bugfix for zope.formlib.

Changed in zope3:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers