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 )



Re: [Zope-dev] ZClass Constructor Cleanup for 2.6

2002-04-01 Thread Casey Duncan

The current Zope cvs trunk now contains these changes. Check it out and 
let me know if you find any gotchas!

-Casey

Didier Georgieff wrote:
 On Wed, 2002-03-27 at 17:31, Casey Duncan wrote:
 
 
ZClasses have been overlooked enough. Nobody has even bothered
putting a ZCatalogPathAware available for them... 

 
 I've done that locally (changing __init__ and the the py but had no 
 chance to make it work with __existing__ ZClasses. 
 Something was coded inside the zclass instance ;-
 
 So i had to patch ZCatalog for getting the right behaviour for my 
 existing products.
 
 So, even if ZClasses are not cooked completely, they allow guys 
 like me to use zope, to promote zopet even if we are useless at 
 good python programming ;-), and until Z3 exists.
 
 All my support for ZCatalogPathAware in 2.6.
 
 Maybe we should investigate :
 
  - how updating old CatalogAware ZClasses for taking care of that
 
  - what impact for already updated construtor scripts ? (shuild be 
 none, but not sure)
 
 Didier.
 



___
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 )



Re: [Zope-dev] ZClass Constructor Cleanup for 2.6

2002-04-01 Thread Anthony Baxter

 Casey Duncan wrote
 I don't think this is a big enough change to warrant a real proposal, so 
 I'll shoot this out here:
 
 Does anyone see a problem with changing the default generated 
 constructor method for ZClasses to a python script in Zope 2.6?

+1.


There's always some funniness in ZClass constructors anyway with
the stupid acquisition tricks that get played, so making it a 
pythonscript can only make it more obvious what's going on...

___
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 )



Re: [Zope-dev] ZClass Constructor Cleanup for 2.6

2002-03-30 Thread Didier Georgieff

On Wed, 2002-03-27 at 17:31, Casey Duncan wrote:

 ZClasses have been overlooked enough. Nobody has even bothered
 putting a ZCatalogPathAware available for them... 

I've done that locally (changing __init__ and the the py but had no 
chance to make it work with __existing__ ZClasses. 
Something was coded inside the zclass instance ;-

So i had to patch ZCatalog for getting the right behaviour for my 
existing products.

So, even if ZClasses are not cooked completely, they allow guys 
like me to use zope, to promote zopet even if we are useless at 
good python programming ;-), and until Z3 exists.

All my support for ZCatalogPathAware in 2.6.

Maybe we should investigate :

 - how updating old CatalogAware ZClasses for taking care of that

 - what impact for already updated construtor scripts ? (shuild be 
none, but not sure)

Didier.

___
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 )



Re: [Zope-dev] ZClass Constructor Cleanup for 2.6

2002-03-27 Thread Matt Behrens

Casey Duncan wrote:

 Does anyone see a problem with changing the default generated 
 constructor method for ZClasses to a python script in Zope 2.6?
 
 I think we are encouraging really bad style by keeping this in DTML, 
 since it is purely business logic.
 
 Thoughts? I will, of course, implement this if nobody objects.

+2

(I'm taking Andreas' vote because he says 'zclasses sux' and 'zclasses 
must die', so he's biased)


___
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 )



Re: [Zope-dev] ZClass Constructor Cleanup for 2.6

2002-03-27 Thread Leonardo Rochael Almeida

On Wed, 2002-03-27 at 17:31, Casey Duncan wrote:
 I don't think this is a big enough change to warrant a real proposal, so 
 I'll shoot this out here:
 
 Does anyone see a problem with changing the default generated 
 constructor method for ZClasses to a python script in Zope 2.6?
 
 I think we are encouraging really bad style by keeping this in DTML, 
 since it is purely business logic.
 
 Thoughts? I will, of course, implement this if nobody objects.

+5

ZClasses have been overlooked enough. Nobody has even bothered putting a
ZCatalogPathAware available for them...

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.


___
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 )



Re: [Zope-dev] ZClass Constructor Cleanup for 2.6

2002-03-27 Thread Casey Duncan

Good point, I'll add that to my list.

-Casey

Leonardo Rochael Almeida wrote:
 On Wed, 2002-03-27 at 17:31, Casey Duncan wrote:
 
I don't think this is a big enough change to warrant a real proposal, so 
I'll shoot this out here:

Does anyone see a problem with changing the default generated 
constructor method for ZClasses to a python script in Zope 2.6?

I think we are encouraging really bad style by keeping this in DTML, 
since it is purely business logic.

Thoughts? I will, of course, implement this if nobody objects.

 
 +5
 
 ZClasses have been overlooked enough. Nobody has even bothered putting a
 ZCatalogPathAware available for them...
 
 



___
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 )



ZCatalogPathAware (was Re: [Zope-dev] ZClass Constructor Cleanup for 2.6)

2002-03-27 Thread Matt Behrens

Leonardo Rochael Almeida wrote:

 ZClasses have been overlooked enough. Nobody has even bothered putting a
 ZCatalogPathAware available for them...

I tried do to this quickly for someone on IRC once.  The problem is that 
the mixin is identically named for CatalogAwareness and 
CatalogPathAwareness, and as such they show up looking exactly the same 
in the ZClass mixin list. :-)

There's probably a way around this that wasn't immediately obvious at 
the time.

___
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 )