[Zope] problem creating ZClasses inside ZClasses

Tres Seaver tseaver@palladion.com
Tue, 18 Jan 2000 17:04:49 -0600


Andy Pahne <ap@net22.net> wrote:

> I know we had this thread already a few weeks ago - and a possible solution
> to my problem:
> 
> When I try to create a ZClass inside another existing ZClass, the inner
> ZClass does not show up in the global product add-list.

This is "by design" -- the factory object for the nested class is "hidden"
inside the containing class, and therefore is not "visible" to objects scanning
the Control Panel | Products folders for buildable widgets.  If this behavior is
not what you want, then you mustn't nest the ZClass.

> And also the inner ZClass does not appear in the list of possible subobjects.
> (The Zope developers guide tells me it should automatically).

It won't show up on the "Subobjects" tabl of the containing class' management
interface, but it *will* show up in the "Add" list of an instance of that class
-- try it and see!

[Andy tries, comes back with a sad expression -- "It's in the 'Add' list, but
when I try to add
 it, I get a 'Resource not found' exception]

Now we direct our gaze to the "nested ZClass factory initialization bug", and
the workaround described in the How-To:

   "ZClasses, ObjectManagers and containers: avoiding the 
    resource not found bug":http://www.zope.org/Members/gtk/containers

Hope this helps,

Tres.
-- 
=========================================================
Tres Seaver         tseaver@palladion.com    713-523-6582
Palladion Software  http://www.palladion.com