[Zope-PTK] toolbox_actions from a Zclass product

Istvan Vago vago@och.bme.hu
Sat, 15 Apr 2000 22:09:42 +0200

Hello PTK gurus,

as I know ZClass-es and DTML much more than Python programming, so I
decided to implement a portal managed ZClass.
I choosed ZClass_for_CatalogAware and ZClass_for_PortalContent as base
classes. Everything is OK for it, I only have one problem. I can't
implement the toolbox_actions method. I tried creating a toolbox_action
method in the ZClass, but I wasn't succeed. From the mailing list I
know, toolbox_actions returns a tuple of dicitionaries with keys:
name, url, permissions, category. I used this DTML:

<dtml-return "{'name':'Edit', 'url':'editForm', 'permissions':[],

but got Zope error with this Traceback:

Traceback (innermost last):
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 214,
in publish_module
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 179,
in publish
  File /usr/share/zope/lib/python/Zope/__init__.py, line 202, in
    (Object: CatalogAware)
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 165,
in publish
  File /usr/lib/python1.5/site-packages/ZPublisher/mapply.py, line 160,
in mapply
    (Object: index_html)
  File /usr/lib/python1.5/site-packages/ZPublisher/Publish.py, line 102,
in call_object
    (Object: index_html)
  File /usr/share/zope/lib/python/OFS/DTMLMethod.py, line 145, in
    (Object: index_html)
  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_String.py,
line 502, in __call__
    (Object: index_html)
  File /usr/share/zope/lib/python/OFS/DTMLMethod.py, line 141, in
    (Object: standard_html_header)
  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_String.py,
line 502, in __call__
    (Object: standard_html_header)
  File /usr/lib/python1.5/site-packages/DocumentTemplate/DT_Util.py,
line 335, in eval
    (Object: getPortal().getToolbox(REQUEST)(this(),REQUEST))
    (Info: this)
  File <string>, line 0, in ?
  File /var/zope/Products/PTKBase/Toolbox.py, line 23, in __call__
  File /var/zope/Products/PTKBase/ToolboxActionProvider.py, line 60, in
    (Object: CatalogAware)
TypeError: loop over non-sequence

Any suggestion?

Istvan Vago