I have been on this Zope journey since late February.  Most times Zope has
been like an artichoke, thorny on the outside but improves dramatically as
you peel off the layers and can get to the meat.  Other times (very few to
date) Zope is like an onion,  the more layers you peel off the more tears
you have to deal with.  Well this is one of those onion-times.

I have been exploring the processes involved in creating Zope products via
ZClasses.  I have read all the primers/How-To's, latest version of the Zope
Book.  I have been successful in creating a
Renderable:Renderable-ZCatalog:CatalogAware structured-text document class.
However, I am unable to create a simple
ZCatalog:CatalogAware-OFS:DTMLDocument class.  I have tried many different
incantations, sacrificed my first born but to no avail.  I have even tried
to just select OFS:DTMLDocument as my subclass.  Regardless how I slice it,
I consistently get:

Error Type: TypeError
Error Value: unsliceable object

The Traceback is as follows:                    ***Sorry, these guys still
evade my comprehension***
Traceback (innermost last):
  File F:\WebSite\lib\python\ZPublisher\Publish.py, line 223, in
  File F:\WebSite\lib\python\ZPublisher\Publish.py, line 187, in publish
  File F:\WebSite\lib\python\Zope\__init__.py, line 221, in
    (Object: RoleManager)
  File F:\WebSite\lib\python\ZPublisher\Publish.py, line 171, in publish
  File F:\WebSite\lib\python\ZPublisher\mapply.py, line 160, in mapply
    (Object: htmlDocumentClass_add)
  File F:\WebSite\lib\python\ZPublisher\Publish.py, line 112, in call_object
    (Object: htmlDocumentClass_add)
  File F:\WebSite\lib\python\OFS\DTMLMethod.py, line 189, in __call__
    (Object: htmlDocumentClass_add)
  File F:\WebSite\lib\python\DocumentTemplate\DT_String.py, line 549, in
    (Object: htmlDocumentClass_add)
  File F:\WebSite\lib\python\DocumentTemplate\DT_With.py, line 133, in
    (Object: htmlDocumentClass.createInObjectManager(REQUEST['id'],
  File F:\WebSite\lib\python\DocumentTemplate\DT_Util.py, line 334, in eval
    (Object: htmlDocumentClass.createInObjectManager(REQUEST['id'],
    (Info: REQUEST)
  File <string>, line 0, in ?
  File F:\WebSite\lib\python\ZClasses\ZClass.py, line 543, in
    (Object: htmlDocumentClass)
  File F:\WebSite\lib\python\OFS\ObjectManager.py, line 265, in _getOb
    (Object: Traversable)
TypeError: (see above)

On one attempt, I modified the constructor input form to use
'addDTMLDocument' and the class method to use 'manage_edit' and
'manage_upload'.  These changes got past the 'unsliceable object' error,
however, when instantiating this class, I was unable to access the property
sheets and views that I had defined.  I was left with the default views
defined for the DTML Document class.

The Zope Book says I can create a new class using OFS:DTMLDocument as my
base class, generate my property sheets, hook my property sheets to views
and be on my way.

If anyone can enlighten me here I would be much in you debt.  Obviously, I
am missing a key point.


Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to