Why exactly are you using the _objects attribute directly? If you subclass from something like Folder you should use the API they have, such as objectIds or whatever you need. jens On Dec 28, 2003, at 14:17, Michael Long wrote:
Hi,
Sorry for the incomplete posting. I hit the wrong hotkey :(
I have a product with an folderish object. When examining the contents of the _objects attribute I see the following behavior when calling the following function through the ZMI.
def test(self): """ """ return self._objects
No items ==> nothing returned 1 *Folder* item ==> ({'meta_type': 'Folder', 'id': 'Folder'},)
2 *Folder* items ==> {'meta_type': 'Folder', 'id': 'folder1'}
3 *Folder* items ==> ({meta_type': 'Folder', 'id': 'Folder'}, {'meta_type': 'Folder', 'id': 'folder2'})
Is this correct behavior? If you delete all but one item _object will contain a sequence of dictionaries instead of a dictionary only. Delete that last item and start over and you will get the behavior shown above.
Environment: Windows XP Pro Zope 2.7.0-b3 Python 2.3.2
Thanks, Mike