[Zope-PTK] Re: ZClass dtml add method

Dave Woolston davew@digicool.com
Fri, 23 Feb 2001 15:49:45 -0500


Bill wrote:


<snip>
> >
> > Add Factory-based Type Information from the portal_types tool.
>
> Selecting atype as defualt, or leave as (none)?

left it as none

>
> > The slight differences in this method that the one outlined in the
tutorial
> > are:
> > Product name - (i.e. PortalPoll)
> > Factory method in product - this is the method that resides in your
product
> > to call to create the object (i.e. addPortalClassPy)
>
> In the product folder, or in the zclass?

In the product folder - when I update the tutorial, I will put
a copy of this script in the zexp file

>
>
> Anyway, I've imported the product and added th addPortalClassPy, and
> followed the steps above ...
> but ...
> it doesn't want to work:
>
>
> Traceback (innermost last):
>    File /local/ZopeSites/Zope2/lib/python/ZPublisher/Publish.py, line 222,
> in publish_module
>    File /local/ZopeSites/Zope2/lib/python/ZPublisher/Publish.py, line 187,
> in publish
>    File /local/ZopeSites/Zope2/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
>      (Object: LockableItem)
>    File /local/ZopeSites/Zope2/lib/python/ZPublisher/Publish.py, line 171,
> in publish
>    File /local/ZopeSites/Zope2/lib/python/ZPublisher/mapply.py, line 160,
> in mapply
>      (Object: invokeFactory)
>    File /local/ZopeSites/Zope2/lib/python/ZPublisher/Publish.py, line 112,
> in call_object
>      (Object: invokeFactory)
>    File
> /local/ZopeSites/Zope2/lib/python/Products/PTKBase/PortalFolder.py, line
> 377, in invokeFactory
>      (Object: LockableItem)
>    File /local/ZopeSites/Zope2/lib/python/Products/PTKBase/TypesTool.py,
> line 660, in constructContent
>      (Object: LockableItem)
>    File /local/ZopeSites/Zope2/lib/python/Products/PTKBase/TypesTool.py,
> line 414, in constructInstance
>      (Object: ElementWithAttributes)
>    File /local/ZopeSites/Zope2/lib/python/Products/PTKBase/TypesTool.py,
> line 385, in _getFactoryMethod
>      (Object: ElementWithAttributes)
>    File /local/ZopeSites/Zope2/lib/python/App/FactoryDispatcher.py, line
> 99, in __getitem__
>    File /local/ZopeSites/Zope2/lib/python/App/FactoryDispatcher.py, line
> 102, in __bobo_traverse__
>    File /local/ZopeSites/Zope2/lib/python/App/Product.py, line 135, in
> _product
>      (Object: LockableItem)
> AttributeError: (see above)
>
>
- When do you get this error - I have tried a couple of things, but can't
get that error and it appears that we have similar versions of PTK -
 (at least for the TypesTool)

Dave