[Zope-CMF] Re: Conflict between PortalFolder and CMFBTreeFolder

yuppie y.2005- at wcm-solutions.de
Mon Jun 20 14:29:49 EDT 2005


Hi Christian!


Christian Heimes wrote:
> yuppie wrote:
>
>> That's not fair. You are free to ignore CMF development for years, but 
>> you can't make other people pay for that. Upgrading from 1.5.x to the 
>> latest 1.5 version has to work without *any* trouble.
> 
> 
> I'm sorry but I'm a little bit nervous. I have to get Plone 2.1 up and 
> running on CMF 1.5 until saturday or Plone 2.1 will stay on CMF 1.4.

Accepted.

> I have another idea. The patch is attached to this mail. In short terms 
> I have renamed PortalFolder to PortalFolderBase subclassed of Folder and 
> created a new PortalFolder class subclassed from OrderedFolder. 
> PortalFolderBase contains nearly all code from PortalFolder. This way it 
> is easy to subclass from PortalFolderBase w/o ordered support.
> 
> class PortalFolderBase(DynamicType, CMFCatalogAware, Folder):
> 
> class PortalFolder(PortalFolderBase, OrderedFolder):
>     manage_renameObject = OrderedFolder.manage_renameObject.im_func
>     tpValues = OrderedFolder.tpValues.im_func

That sounds *much* better :)

But please use OrderSupport instead of OrderedFolder. That makes the 
inheritance tree much simpler and you don't have to override the methods 
again:

   class PortalFolder(OrderSupport, PortalFolderBase):


Cheers,

	Yuppie



More information about the Zope-CMF mailing list