[Zope3-dev] Heads up: major event changes

Jim Fulton jim at zope.com
Thu May 27 08:29:53 EDT 2004


Sidnei da Silva wrote:
> |       <subscriber
> |           for="zope.app.event.interfaces.IObjectModifiedEvent"
> |           factory=".timeannotators.ModifiedAnnotator"
> |           />
> | 
> |       <subscriber
> |           for="zope.app.event.interfaces.IObjectCreatedEvent"
> |           factory=".timeannotators.CreatedAnnotator"
> |           />
> 
> Just one note: 'factory' looks weird here as its not really a factory
> and instead just a function that handles an event. 

I agree. I thought of "handler" as another name for factory:

        <subscriber
            for="zope.app.event.interfaces.IObjectCreatedEvent"
            handler=".timeannotators.CreatedAnnotator"
            />



I was going to require the "provides" attr if "factory" was used and not allow it
if "handler" was used. Then I realized that I would have had to write tests for
this and time is short.  IOW, I don't have time to do this.  If someone wants to
do a small project, I'd be very much in favor of a change like this.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org




More information about the Zope3-dev mailing list