[Zope] Checking for ID's before creating ZClass

Ivan Cornell ivan.cornell@framestore.co.uk
Tue, 07 Nov 2000 18:45:45 +0000


Hello from rainy England,

In my constructor for a ZClass I want to auto generate an ID consisting
of a name followed by a incrementing sequence (port0, port1, port2...).
How do I check for all existing id's in a folder? I tried doing it in a
PythonMethod (or whatever they are called now!), calling hasattr() but
failed. Another possibilty would be to loop on a
try..<createInObject>..raise until successful, but that doesn't seem
very zopish. In the source code for createInObjectManager I can see it
getting the folder, but can't figure how to acheive that directly,

Ivan