[Zope] objectValues does not return all objects

Robert Rottermann robert@redcor.ch
Fri, 5 Oct 2001 20:43:32 +0200


Hi friends,

I have a folder with some objects in it. Some of them I would like to treat
with an external method.
I collect them with a call to objectValues.
My problem is that when I use a filter for the objects I am interested in I
get one object to little.
Just collecting all object, and filtering them by hand produces the correct
result

Thanks for any tips what could be the reason

Robert

I am using the following script

def Verteilen(self):
  out = StringIO()
  trans = getattr(self, 'trans', None)

  #collect list with redlctures
  redlectureList = self.objectValues('RedLecture')
  out.write('%s\r' % len(redlectureList))         <--- one to little

  r = {}
  # the following produces the correct result for 'RedLecture'
  redlectureList = self.objectValues()
  for rl in redlectureList :
    if(r.has_key(rl.meta_type)):
      r[rl.meta_type] += 1
    else:
      r[rl.meta_type] = 1

  out.write(str(r))
  return out.getvalue()