[Zope] External Method2
   
    Tom Deprez
     
    tom.deprez@uz.kuleuven.ac.be
       
    Tue, 28 Mar 2000 17:29:03 +0200
    
    
  
I found everything I needed, however the iteration doesn't work :-(
Can somebody tell me why the functions below are not giving a result?
def recursiveMethod(obj):
     result = []
     if obj.aq_parent != None:
          result = recursiveMethod(obj.aq_parent)
     if obj.meta_type=='KBItem':
          result.append(obj.Title)
     return result
Then call this method like:
def GetParentNames(self):
     recursiveMethod(self)
------ OR --------
def GetParentNames(self):
  result=[]
  obj=self
  while obj.aq_parent != None:
    obj=obj.aq_parent
    if obj.meta_type=='KBItem':
      result.append(obj.Title)    
  return result
Thanks in advance,
Tom.