[Zope] ZClasses problem

Alex Rice alrice@swcp.com
Sun, 27 Jun 1999 18:06:25 -0600 (MDT)


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