[Zope] ZClasses problem
Alex Rice
alrice@swcp.com
Wed, 30 Jun 1999 00:39:52 -0600 (MDT)
On 29 Jun 1999 23:36:46 -0400,
michel@digicool.com said:
michel> Have you tried to getattr()
michel> self.Control_Panel.Products.Etexts.etext_add?
Yep, I can do that, but I get an error when I call it. Here is what I'm
seeing. I created a Product Foo with a ZClass foo in it, with foo_add,
foo_addForm and foo_factory.
I created an external method that that makes these calls. Here are the
calls and results:
# this gets an Attribute Error on 'Foo' (not 'foo')
self.manage_addProduct.Foo.foo(id='hi')
# this appears to do nothing
self.Control_Panel.Products.Foo.foo(id='hi')
# this gets a NameError on foo.createInObjectManager()
self.Control_Panel.Products.Foo.foo_add(id='hi')
# this creates an object 'hi' in Products/Foo -- not in the current folder
self.Control_Panel.Products.Foo.foo.createInObjectManager('hi', {})
How do I create a ZClass in the current folder using an external method?
I feel like the answer is probably going to slap me across the head RSN
but I've been stumped on this for a few days now.
Thanks for any pointers, satori, etc.
Alex Rice | alrice@swcp.com | http://www.swcp.com/~alrice
Current Location: N. Rio Grande Bioregion, Southwestern USA