[Zope-dev] Recursively adding ZClasses (continued)

Rik Hoekstra rik.hoekstra@inghist.nl
Wed, 07 Jun 2000 17:57:51 +0200


<snip>

Thanks for replying Kevin, but it won't work ;-( I tried it ALL, and it
_will_not_work_. The nested ZClasses will apparently solve it (I used it
elsewhere), but it will get you into trouble in other situations - if
you want to add an instance of the nested zclass to an existing instance
of that same nested zclass. I had to change my product before because of
that.

> 
> I'm using nested ZClasses in KM|Net News. Take a look at the AddArticle
> method. In KMNN, these ZClasses are set up as nested ZClasses, so that may
> change things somewhat. However, it may still work. Rather than doing
> manage_addProduct[], you *might* be able to just directly call
> ZClass_add(_.None, _), because it could be in your acquisition path at the
> top of the product. In KMNN, that's all I had to do, but in that case the
> ZClass_add method was located within the ZClass that was to contain it.
> 
> That sounded kind of rambling, so I hope it makes sense...

No matter if you use ZClass_add directly or in  dtml-with. No matter if
you close the first dtml-with and open another. No matter if you
redirect to get out of namespace problems (that will _really_ give
strange errors). Believe me, it was a _very_ frustrating experience (and
I really wanted to refrain from ranting -just couldn't help myself)

thanks again for replying

Rik