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

2002-04-02 Thread R. David Murray

On Mon, 1 Apr 2002, Jeffrey P Shell wrote:
 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.

Ah, I get you.  So the issue is with import and manage_afterAdd,
not with import and CatalogAware specifically.  That's what confused
me in your message wry grin.  Zope probably needs some refactoring
to fix that one

--RDM


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



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

2002-04-01 Thread Jeffrey P Shell

On 4/1/02 5:59 PM, R. David Murray [EMAIL PROTECTED] 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



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )