[Zope] ZClasses problem

michel@digicool.com michel@digicool.com
29 Jun 1999 23:36:46 -0400


Alex Rice <alrice@swcp.com> writes:

> Has anyone been able to create ZClasses via an external method? Can you
> send me a snippet of code? Thanks, what I'm trying to do is below.
> 
> Alex
> 
> *Note there was a typo below. I said Etext/ where I meant Etexts/
> 
> ------- Start of forwarded message -------
> Date: Sun, 27 Jun 1999 18:06:25 -0600 (MDT)
> Message-Id: <199906280006.SAA27366@inago.swcp.com>
> From: Alex Rice <alrice@swcp.com>
> To: zope@zope.org
> Subject: [Zope] ZClasses problem
> X-Mailman-Version: 1.0b8
> Precedence: bulk
> List-Id: Users of the Z Object Publishing Environment <zope.zope.org>
> X-BeenThere: zope@zope.org
> 
> I'm trying to create some ZClasses via an external method, but I'm
> running into a problem: I can't getattr() the product's methods. For
> instance, I have a Product called Etexts, containing 
> 
>   a zclass          etext  
>   a dtml method     etext_add (etext constructor) 
>   a dtml method     etext_addForm (etext constructor input form) 
>   a factory         etext_factory (etext factory) 
> 
> I can go anywhere in my Zope heirarchy, and in an external method, I can
> getattr() to manage_addProduct/Etext, but when I try to getattr() to
> manage_addProduct/Etext/etext, etext_add, or etext_addForm, I get an
> AttributeError.
> 

Have you tried to getattr()
self.Control_Panel.Products.Etexts.etext_add?

-Michel