[Zope-dev] FW: Catalogs, Imports, and Path Awareness (was Re: [Zope-dev] ZClass Constructor Cleanup for 2.6)

Jeffrey P Shell jeffrey@cuemedia.com
Mon, 01 Apr 2002 19:46:34 -0700


On 4/1/02 5:59 PM, "R. David Murray" <bitz@bitdance.com> wrote:

> On Mon, 1 Apr 2002, Jeffrey P Shell wrote:
>> If other people have come across this, I think finding a resolution to this
>> would be a more-than-worthy 2.6 project.  If I'm just smoking crack and it's
>> only a ZPatterns/TransactionAgents behavior that I'm witnessing, then I'll
>> just leave my huffing and puffing and whining and yelling and fainting to
>> myself and immediate coworkers next time I have to go through this
>> situation.  :/
> 
> I thought that with ZPatterns one was recommended to avoid the
> Catalog mixins and instead use something like SteveA's
> catalog trigger from ZPAddOns (I think that's the right product
> name).

That's what I did.  But, looking at the import machinery, the newly imported
object is added in to it's parent object with '_setObject', which then goes
and calls "self.manage_afterAdd()", which then goes down into all of the
subobjects and calls that.  That's probably the right thing, but it is
what's causing the double cataloging, regardless of how the item is
cataloged.  Catalog*Aware objects call into the catalog during
manage_afterAdd, and I'm sure that the same thing is happening to my "WHEN
OBJECT ADDED..." triggers as well.

*sigh*.

I've got a few quarter assed solutions in my head, but I don't like any of
them.  Waaa.

-- 
Jeffrey P Shell 
www.cuemedia.com