[Zope-CMF] listFilteredActionsFor
Tres Seaver
tseaver@zope.com
19 Jul 2002 12:17:28 -0400
On Thu, 2002-07-18 at 14:03, Dieter Maurer wrote:
> Chris McDonough writes:
> > ...
> > It would be more useful if listFilteredActionsFor created a copy of
> > the original actions dictionary and munged certain keys and values
> > if necessary, but otherwise left key/value pairs that it didn't know
> > about alone. This would allow people to create key/value pairs that
> > are useful (such as "action_html", which could specify some HTML to
> > use as a toolbar icon or whatnot), but that are not explicitly
> > supported by the "normal" action structure.
> > ...
> > This is in support of iconic action toolbars. Does anybody hate
> > this idea (or better yet, have a better idea?)
> I like the idea.
>
> I even would prefer objects rather than dictionaries (I think,
> internally, they are already objects and get converted into dictionaries).
> This way, they could get even more interesting behaviour.
I have changes on a branch, 'tseaver-typeinfo_as_apb-branch', which
modify the TypeInformation objects to derive from ActionProviderBase,
and therefore manage lists of ActionInformation objects rather than
dictionaries (just as the tools do). Chris and I talked about making
the equivalent change to the ActionInformation instances: they would
expose an additional "propertysheet-like" interface for setting
arbitrary additional data.
We should also add a "first-class" property to ActionInformation for an
icon, as this will be generally useful in lots of places.
I plan to merge this branch *after* the 1.3 release, unless I get
significant feedback that it is OK (works with Plone, with other custom
add-ons, etc.) Real Soon Now (tm).
Tres.
--
===============================================================
Tres Seaver tseaver@zope.com
Zope Corporation "Zope Dealers" http://www.zope.com