I've patched DataSkins.py to add this method:

     def kickTriggers(self,_v_status_=_v_status_,_v_dm_=_v_dm_):
         """Cause triggers to be set off at the end of this
            transaction, without needing to set any attributes."""
         self = self._canonicalForm()
         if self._v_status_ is not ChangedStatus:
             d[_v_status_] = ChangedStatus

I often want triggers to fire on a DataSkin because some other 
specialist knows about a change that will affect that Dataskin's 
computed attributes. I don't need to change the DataSkin; I just want 
the triggers to fire at the end of the transaction.

My current hack for causing triggers to fire without needing to actually 
change an attribute has recently stopped working.


This is due to recent optimisations in OFS/PropertySheets.py in Zope 2.3 
from CVS -- now, an object only gets changed when you alter a property 
that actually exists. This is a good thing, as it reduces bloat in the ZODB.

I'd welcome suggestions on a better name for the method than 
"kickTriggers". :-)

Steve Alexander
Software Engineer
Cat-Box limited

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to