[Zope3-dev] Re: Proposal: Simplify lifecycle- and location-related events

Jim Fulton jim at zope.com
Wed Sep 10 18:29:25 EDT 2003


Jim Fulton wrote:
> 
> With this proposal, we *can* make containers responsible for
> generating add/move/remove events:
> 
> http://dev.zope.org/Zope3/SimplifyObjectLifecycleAndLocationEvents
> 
> Thoughts?
> 
> Silence is assent. :)

Aargh.

   http://dev.zope.org/Zope3/LocationRelatedEvents

provides another justification for why events need to be handled by
application code, rather than containers.  Consider two objects, X,
and Y. X depends on Y. There is an integrity constraint that checks to
make sure that we don't delete Y if X is still around. Suppose that X
and Y are located in the same container.  Imagine that someone selects
both X and Y and clicks the "Delete" button. If we delete X before
deleting Y, there is no problem, but, if we delete Y first, we'll get
an error because we are violating the integrity constraint.

I've added a second issue to the proposal that describes this in more
detail and proposes an approach to get around it.  (It presents 2
approaches, but rejects one of them. :)

Jim


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





More information about the Zope3-dev mailing list