[Zope] External Method 3
Tom Deprez
tom.deprez@uz.kuleuven.ac.be
Fri, 31 Mar 2000 12:08:47 +0200
>
>Ah, so I understand that it's not called with arguments. So you need
>another external method.
>Change you external method to look like this
>
>def recursiveMethod(obj, result):
> if hasattr(obj, 'aq_parent'):
> result.append(obj.title)
> recursiveMethod(obj.aq_parent, result)
> return result
>
>
>def ParentList(self):
> obj=self
> return recursiveMethod(obj, [])
>
>Then make you external method refer to ParentList
>This works without arguments from a testfolder. It should work from a
>ZClass as well, but I did not test that.
>
This becomes very funny, it doesn't work. It still returns nothing.
Although I found a way to get this working, I would really like to know the
cause why it doesn't work. I'll try something different right away.
Tom.