Title: Re: [Zope-dev] Please HELP: Nested ZClass, Nested instance

Hello Karl, who has same name as me:-)

Yes, I can create child zclass nested in parent zclass according to the Howto on management interface.
And the zclasses were inherited from Object Manager and Catalog aware class.

But still I can't do it programatically.
If you know how to do it, your advice would be appreciated.
(Due to the schedule, I decided to just go ahead according to Rik Hoekstra's advice)

I found a interesting fact.
When we access some ZClass in the product folder, the typical syntax used is(in DTML)
        self.Control_Panel.Products['MyProductFolderName'] (Python)

This syntax seems to say that Products is a dictionary object of Python, because
we can access each product folder by key.
But when I try this,
        <dtml-var "_.len(this().Control_Panel.Products">
this returns just "1"
But interestingly,
        <dtml-in "this().Control_Panel.Products.objectIds()>
                - or -
        <dtml-in "this().Control_Panel.Products['MyProductFolderName'].objectIds()">
returns expected results.

Should I think "Product" folder under "Control_Panel" to be a kind of dictionary object?
Thanks a lot

Message: 17
To: "Zope-Dev \(E-mail\)" <[EMAIL PROTECTED]>
Subject: Re: [Zope-dev] Please HELP: Nested ZClass, Nested instance
From: Karl Anderson <[EMAIL PROTECTED]>
Organization: Digital Creations
Date: 22 May 2000 15:34:57 -0700

"Park, Karl" <[EMAIL PROTECTED]> writes:

> I created a ZClass in the Product folder. And anther ZClass under the
> ZClass(thus nested class)

> To do it, I created a DTML Method which accepts user's input and then, if
> needed, it have to create an object.

> First part is to create the parent object, which works just fine.
> But the sencond part to create the child object doesn't seem to work.
> If I take the easy way, that is, creating othere ZClass on the top of the
> products folder of Control Panel, I can do it.
> But I don't think it is a good desing from the perspective of OOP....

I had some hassles with this recently.  There's a HOWTO at:


Can you create the child zclass from the manage screen inside the
parent zclass?

Does the parent zclass inherit from ObjectManager before any other

Karl Anderson                          [EMAIL PROTECTED]

Reply via email to