Re: [Zope] ZClass-within-a-ZClass not in subobjects list?

2000-06-18 Thread Matt Behrens

On Sun, Jun 18, 2000 at 01:28:26PM -0400, Tres Seaver wrote:

> Matt Behrens <[EMAIL PROTECTED]> wrote:
>
> > No matter what I do, I can't seem to make a ZClass a subobject of
> > another ZClass. I'm really not sure what I'm missing. Here's what
> > I've done:

[snip]

> There are a couple of items in play here:
> 
>  * Nested ZClasses are *always* addable in their containing ZClass,
>so they don't show up as options in the Subobjects tab.

OK, cool.  That makes sense.

>  * If you have *exactly one* nested ZClass in a container ZClass,
>*and* you have not specified any "outside" objects as addable
>on the Subobjects tab, then the only objects which will be
>addable in the container ZClass are instances of the nested one;
>in this case, the management interface does not display a
>dropdown list, but only the "Add" button (try clicking Add on
>your Whiteboard object's Contents tab).

What was throwing me here is that when I'd hit the ``Add'' button,
I'd get ``Resource not found''.  After mumbling on #zope for awhile,
I finally went digging though the mailing list archives and discovered
an issue dating at least back to September 1999 indicating that you
had to go into the inner ZClass's factory and hit ``Change'' to
make it work.  I did this and it worked.  Collector #1334 has
details.

[snip]

> Patches gratefully accepted :)

When I discovered that what I was seeing was a bug, that was the
first thing I tried to do -- find the problem and fix it -- but at
this point, I'm too green yet to figure it out.  Maybe in the future.

Thanks!

-- 
Matt Behrens <[EMAIL PROTECTED]>
Student of Zope Zen
Owner/Administrator, zigg.com

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




Re: [Zope] ZClass-within-a-ZClass not in subobjects list?

2000-06-18 Thread Tres Seaver

Matt Behrens <[EMAIL PROTECTED]> wrote:
> 
> No matter what I do, I can't seem to make a ZClass a subobject of
> another ZClass. I'm really not sure what I'm missing. Here's what
> I've done:
> 
> 1.  Created a new product: WhiteboardProduct.
> 
> 2.  Created a ZClass within that product that inherits from
> ObjectManager: Whiteboard. Allowed Zope to create all the
> methods.
> 
> 3.  On Whiteboard's method page, created another ZClass that doesn't
> inherit from anything: WhiteboardItem.
> 
> If the documentation (ZDG) is to be believed, at this point I would
> have a subobject visible in Whiteboard's subobject list. (It is not
> so.) If I instantiate Whiteboard, I do not get a drop-down list of
> items. Oddly enough, if I select a random item (say, Folder) on
> Whiteboard's subobjects list, I now get a drop-down list of items
> in my instance that does have WhiteboardItem as a choice (of course,
> its meta type, not ``WhiteboardItem'').
> 
> What am I doing wrong here?  This is a 2.1.6 installation that I'm
> playing around on, btw.

There are a couple of items in play here:

 * Nested ZClasses are *always* addable in their containing ZClass,
   so they don't show up as options in the Subobjects tab.

 * If you have *exactly one* nested ZClass in a container ZClass,
   *and* you have not specified any "outside" objects as addable
   on the Subobjects tab, then the only objects which will be
   addable in the container ZClass are instances of the nested one;
   in this case, the management interface does not display a
   dropdown list, but only the "Add" button (try clicking Add on
   your Whiteboard object's Contents tab).

The bad news here is that there are some weirder interactions
possible, as well (several recent Collector issues come to mind);
the good news is that they are almost all related to the UI -- the
underlying object system is pretty sane.

Patches gratefully accepted :)

Tres.
-- 
===
Tres Seaver[EMAIL PROTECTED]
Digital Creations"Zope Dealers"http://www.zope.org

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