[Zope-dev] getPersistentItemIDs not cooperating?

Steve Spicklemire steve@spvi.com
Wed, 23 May 2001 09:28:08 -0500


Has anyone seen anything like this?

I have the following script in a Specialist:

## Script (Python) "deleteAllTracks"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
trackMaster=context.Tracks

import string

iList=[]

for id in trackMaster.defaultRack.getPersistentItemIDs():
	iList.append(id)
	theItem=trackMaster.getItem(id)
	iList.append(theItem.manage_delete())
	
return "OK! deleted:" + string.join(iList,',')

It works.. partially. For some reason it looks like getPersistentItemIDs 
does not always return a *complete* list. I need to run this method 
several times to completely exhaust the Rack's storage. Thoughts? The 
only way I ever create Track objects is via a different method that is 
only accessed once (a long time ago!)

thanks,
-steve