Re: [Zope-dev] ZPatterns: missing docstring in getItem()
"Phillip J. Eby" wrote:
That's great. Did you get my message about errors in triggered methods?
Yes, I did, but the solution requires some more thought. I had thought I had the "Transactional" machinery set up so that stuff was only called during transaction phases where it was safe to throw errors. So I'm going to have to go back and review that. However, I also think that errors in triggers should result in a rollback-and-abort, rather than silently failing, which could cause many other problems.
Right. So the application designer has the choice of whether to put their methods that are called by GenericTriggers in try-except blocks, if it doesn't matter if the trigger fails. But it is generally assumed that triggers need to run without exceptions for the application to work consistently. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net
Here's the details from the CHANGES file: New Features/Bug Fixes in 0.4.0alpha5 - Property Sheets for DataSkin-based ZClasses. Now you can put define property sheets on a ZClass and still use AttributeProviders for the properties. Just add a "DataSkin Property Sheet" to your ZClass instead of a "Common Instance Property Sheet". (Note: you can only do this with *new* DataSkin-derived ZClasses. If you have an already existing ZClass, you must either re-create it by hand or do the "setbasesholdontoyourbutts" hack to re-create the ZClass.) - GenericTriggers now also pass a variable "ORIGINAL" which is a dictionary of the original values of changed attributes (or NOT_FOUND if the attribute did not exist before changing). Note that if the values are complex or mutable, they cannot be guaranteed to be truly the same as their starting state, so this should really only be used for simple atomic values like strings and numbers. - Numerous bug fixes, including: - Specialists were always returning the result from the first Rack - setuid support for LoginManager was broken, and also didn't deal with executable-owner masking - _DelAttributeFor() was broken for persistently-stored attributes - Deleting a non-existent attribute no longer flags the attribute as changed - _constructPlugIn() was broken with latest 2.2 version that binds constructors to their products/factories - In the latest Zope, setting ownership after adding was causing a Changed event to fire instead of an Added event.
participants (2)
-
Phillip J. Eby -
Steve Alexander