[Zope] Problem with Classes in Classes [Newbie]

Andrew Diller dillera@isc.upenn.edu
Wed, 16 Feb 2000 18:28:46 -0500 (EST)


Hello:

I'm trying to create classes in classes as per the Zope Developers Guide-
page 11 "Classes inside Classes."

- I've created a product, and create a Zclass in it (subclass of Object
     Manager)
 - then in the method of that ZClass, I create some more Zclassses
  - In those ZClasses I set up some Properties and Views
 - There is a "Contents" View in my parent ZClass, with a 
    manage_main in it.
 - I add views to the First Zclass of the child classes

---

Then I go and create a new folder at the top level.

In that folder I create an instance of my Zclass

In that instance, when I attempt to add on of the subclasses, I get a Zope
error:

Zope Error

         Zope has encountered an error while publishing this resource. 

         Resource not found

         Sorry, the requested Zope resource does not exist.

         Check the URL and try again.

Traceback (innermost last):
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 214, in
publish_module
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 179, in
publish
  File /usr/local/zope/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
    (Object: RoleManager)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 151, in
publish
  File /usr/local/zope/lib/python/ZPublisher/BaseRequest.py, line 426, in
traverse
  File /usr/local/zope/lib/python/AccessControl/User.py, line 375, in
validate
    (Object: RoleManager)
  File /usr/local/zope/lib/python/ZPublisher/HTTPResponse.py, line 511, in
notFoundError
NotFound: (see above)


------

If, in my instance, I click on a View of the child classes I also get an
error:

Zope Error

          Zope has encountered an error while publishing this resource. 

          Error Type: KeyError
          Error Value: id


Traceback (innermost last):
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 214, in
publish_module
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 179, in
publish
  File /usr/local/zope/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
    (Object: nisc4)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 165, in
publish
  File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 160, in
mapply
    (Object: diskClass_add)
  File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 102, in
call_object
    (Object: diskClass_add)
  File /usr/local/zope/lib/python/OFS/DTMLMethod.py, line 145, in __call__
    (Object: diskClass_add)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_String.py, line 502,
in __call__
    (Object: diskClass_add)
  File /usr/local/zope/lib/python/DocumentTemplate/DT_With.py, line 133,
in render
    (Object: diskClass.createInObjectManager(REQUEST['id'], REQUEST))
  File /usr/local/zope/lib/python/DocumentTemplate/DT_Util.py, line 335,
in eval
    (Object: diskClass.createInObjectManager(REQUEST['id'], REQUEST))
    (Info: diskClass)
  File <string>, line 0, in ?
  File /usr/local/zope/lib/python/DocumentTemplate/DT_Util.py, line 161,
in careful_getitem
  File /usr/local/zope/lib/python/ZPublisher/HTTPRequest.py, line 760, in
__getitem__
KeyError: (see above)



----

Why the id error for this?


thanks for any input,


andy


- - - - - - - - - - - - - - - - - - - 
Andrew Diller   dillera@isc.upenn.edu
Information Systems and Computing
Unix Systems Group
University of Pennsylvania
v: 3-7360 f: 8-9348