[Zope-CMF] What's the CMF way to override a method

marc lindahl marc@bowery.com
Fri, 25 May 2001 18:55:02 -0400


It's a bit of a pain... but by making a ZClass Product that inherits (only)
from the CMF thing you want to override, then make a method in there that's
the same name, with the new stuff.  Then make a factory based type out of
the new thing.  Pain?  well, not TOO bad...  then you'd disable the regular
File in portal_types (just delete it, or change the permissions).

> From: "Loren Stafford" <lstafford@morphics.com>
> Date: Fri, 25 May 2001 15:44:25 -0700
> To: "Zope-Cmf" <zope-CMF@zope.org>
> Subject: [Zope-CMF] What's the CMF way to override a method
> 
> I don't like the way CMFDefault.File.download works. So, I want to override
> it with my own method in a simple way that will not be undone by upgrading
> to future releases of CMF. I know I can create a new factory type derived
> from File, but that seems like overkill. I looks like I could somehow use
> the /Portal/portal_types/File Action tab, but I haven't succeeded.
> 
> There must be a simple way to do this. Could somebody point me in the right
> directions?
> 
> -- Thanks
> -- Loren
> 
> 
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
> 
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
> requests