Maurits van Rees-3 wrote:
>
> But I wonder if there are other options. The event has a tuple
> descriptions that could contain some hints of the changes, but that is
> empty. The event does not have something like oldObject and
> newObject. Is anything like that available? Maybe in newer versions
> of Archetypes, Zope or Plone?
>
I think the 'descriptions' tuple may be intended to keep a list of e.g.
which fields have changed. I don't think it's meant to hold the old values.
In any case, it's up to the code that emits the event to pack this
information, and I don't know anywhere that does it.
Having an "oldObject" doesn't make sense, because that's not how objects are
updated. The event is per-object, not per-field, and we don't update objects
by making a copy of the entire object and then changing values, we just
change fields directly.
You'll need to work around this yourself, either by explicitly holding the
previous value somewhere (custom mutator?) or by making different
calculations.
Martin
--
View this message in context:
http://www.nabble.com/IObjectModifiedEvent%3A-can-you-know-the-previous-values--tf3516657.html#a9816801
Sent from the Plone Product Developers mailing list archive at Nabble.com.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers