But I still don't know which object or method to call? I can call the MyNestedZClass_add method, but it needs the "_" parameter like the following dtml: <dtml-call expr="MyNestedZClass_add(_.none, _, noredir=1)"> but how do I mimick this from an external method, or how can I just create an instance of MyNestedZClass and add it to a folder? If someone can just give me an example of doing it in external method, I am sure the light would turn on and it would all make sense. Thanks Chris --- Dieter Maurer <dieter@handshake.de> wrote:
Chris Bruce writes:
But, how do you add a nested ZClass. For instance, if MyNestedZClass was a zclass inside of MyZClass? I have tried: ...
newob=self.Control_Panel.Products.MyProduct.MyZClass.MyNestedZClass(id)
... But it gives me an attribute error for MyNestedZClass. I have searched and experimented, but I can seem to get a reference to the Nested ZClass. This seems very easy in DTML, but I can't figure it out for external method. Do it the same way as in DTML.
There are only two differences between ExternalMethod and DTML:
1. you do not have the magic DTML namespace. This means, you need to know which object provides the name you want to use.
2. You must call methods explicitly and provide the correct parameters.
Dieter
__________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/