[Zope] RE: [ZOPE Collector] Zope Question entry: Basic ZClass Containers : Resource Not Found on add? : Resource Not Found on add?

Michel Pelletier michel@digicool.com
Wed, 6 Oct 1999 10:01:32 -0400


> -----Original Message-----
> From: gtk@well.com [mailto:gtk@well.com]
> Sent: Wednesday, October 06, 1999 5:49 AM
> To: support@digicool.com
> Subject: [ZOPE Collector] Zope Question entry: Basic ZClass 
> Containers:
> Resource Not Found on add? 
> 
> 
> Description:  The ZDG cops out just before explaining how to 
> create ZClass containers. Trying the obvious doesn't seem to work: 
> 
> * create a ZClass with base classes ZObject 
>   and ZObjectManager and default constructor, 
>   factory etc
> * create a ZClass inside it with base class
>   ZObject
> * create an instance of the top ZClass
> * visit it; the Container pane will be displayed
> 
>     Fnord Container at /FnordTest  
>     There are currently no items in FnordTest 
>     To add a new item click "Add".   
> 
> * click on the Add button
> 
>     Zope Error
>     Zope has encountered an error while 
>     publishing this resource. 
>     Resource not found
> NotFound: (see above)
> 
> For some reason, my FnordContainer won't let me specify a 
> Fnord as a subobject -- perhaps because Fnord is defined 
> inside FnordContainer? 
> 
> I can't see why this shouldn't work, Zope isn't helping me 
> figure it out, the documentation doesn't cover it, and I 
> can't find a HowTo about it. Is this a bug, or expected behaviour? 

If you look at your FnordContainer ZClass you'll see a tab called
'subobjects'.  This contains a list of objects that can be added to your
container.  You must select one of these objects in order for the add
list to come up correctly.  It is a bug that ZClasses contained in a
ZClass ObjectManager don't show up in this list so you can specify them.

-Michel