[Zope] ZClasses problem

Alex Rice alrice@swcp.com
Tue, 29 Jun 1999 16:50:17 -0600 (MDT)


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.

I don't have this problem within Zope-- for instance in my browser I can
successfully call and create a ZClass with
http://some_long_path/manage_addProduct/Etexts/etext?id=spam

What am I doing wrong to not be able to get to the same method via an
external method?

Is this the correct way to programatically add ZClasses? As usual, I'm
kind of emulating what goes on in the Zope user-interface.

TIA

Alex Rice    |    alrice@swcp.com    |    http://www.swcp.com/~alrice
    Current Location: N. Rio Grande Bioregion, Southwestern USA


_______________________________________________
Zope maillist  -  Zope@zope.org
http://www.zope.org/mailman/listinfo/zope

(For developer-specific issues, use the companion list,
zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )

------- End of forwarded message -------