[Zope-dev] Subpath traversal
Evan Simpson
evan@4-am.com
Mon, 20 Dec 1999 22:52:00 -0600
Michel Pelletier wrote:
> I suspect I'm beginning to see your side of the argument, A 'Rule' mixin
> would conflict with the SiteObject mixin if they both wanted to hook
> __b_t__, so your __before__ hook was a way to chain calls like this?
Pretty much, although "chaining" isn't quite the right word for it. It
simply keeps a sorted collection of methods and invokes them all. I did
originally consider chaining __bobo_traverse__ -- saving the existing
method (if any), calling it after my object's hook was done, restoring it
when my object was deleted, etc. The fact that _b_t_ can (in fact, is
meant to) replace the current traversal object makes the semantics of such
chaining troublesome. If one _b_t_ method replaces the current object,
would it make any sense to call further _b_t_ methods of the old object?
Cheers,
Evan @ 4-am