[Zope-CMF] [dev] Re: shared mutable defaults

Tres Seaver tseaver@zope.com
07 Feb 2003 18:56:14 -0500


On Fri, 2003-02-07 at 09:10, Yuppie wrote:
> Tres Seaver wrote:
> >>*All* subclasses of ActionProviderBase overwrite this default tuple with 
> >>a default list. I thought there is a reason for that, but it seems I was 
> >>wrong: '_actions' needs to be a sequence, not a list.
> >>
> >>Does that mean all action providers are broken and should be fixed?
> > 
> > 
> > Hmm, I think so.  I would say that making all those lists into tuples
> > should be a no-impact change, and it would make the inttent clearer.
> 
> This is now <http://collector.zope.org/CMF/123> .
> 
> > Note that the one piece of code which does the Right Thing (TM) is the
> > CMFCore/TypesTool.py:  ironically, that code was slated to be ripped out
> > after 1.3, and replaced with an APB-derived TypeInformation class (in
> > CVS on the 'tseaver-typeinfo_as_apb-branch').  Perhaps we should work
> > out whether to merge that branch for 1.4?  I think the only downside is
> > that we would need to handle forward-compatibility for old type
> > information objects.
> 
> +1
> 
> BTW: What is the status of chrism-actions-branch? What is it good for?

Chris was experimenting with storing an "arbitrary" dictionary on the
action objects, in order to support things like action-specific icons,
Javascript, etc.  I think he had it working for actions defined in
filesystem product code, but not TTW.

Correct me if I'm wrong, Chris!

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com