Hi! Magnus Heino wrote:
I must admit that as I think about it, the whole ordered folder notion (with or without this functionality) seems to be more about skinning the existing folder UI than it is about creating a new slightly-different metatype.
This is what I was trying to say in my post a few days ago.
I still dont think that OrderedObjectManager should be a container/folder type.
It should be a metatype that you can add to any existing folder, btreefolder, ldapfolder, sqlfolder, or whatever you may have. Configure it from where to get ids (could be objectIds, a catalog query using pathindex or just about anything), and provide a way to sort them.
Well. The problem is: We are not talking about Zope3. In the thread the proposal was discussed, Shane wrote:
In Zope 3 you'd be able to do it right. In Zope 2 you can hope for nothing better than a terrible hack.
Zope 2 folders already have the _objects tuple. Do you want to maintain a second list to store order? A lot of products make use of details of the current Folder implementation. Rewriting parts of it would cause a lot of trouble. Our first proposal was to add the ordering API to the default Folder. The result of the discussion was OrderedFolder. That makes it easier to migrate to Zope3: If it is an OrderedFolder, the order of _objects is important, if it is an Folder, we just can discard _objects. I'd be more than happy if someone comes up with a better solution for Zope 2.7. But I'm not willing to wait for Zope3 to do it right. Cheers, Yuppie