[Zope] Zclass and subobjects

Heiko Stoermer Heiko Stoermer <heiko.stoermer@innominate.de>
Fri, 05 May 2000 14:03:26 +0200


Brown Fox wrote:
> 
> Hello,
> i create a zclass with the objectmanager base class
> selected. Then as subobjects i select image and
> folder.
> When i instance it i see that i can add only folders
> and images, but if i create a folder i can add
> whatever object i want in it.
> Why?
> My idea was that also in that folder the only objects
> i can add are image and folder...

your zclass instance works correctly: as you said, you _can_ add only
folders and images.
but look around: what kinds of objects can you add to a plain folder?
practically everything, right?

now if you add a plain folder to your instance, the folder still remains
a folder, so it still can hold all other kinds of objects, regardless if
it lives in your zclass instance or wherever.

I guess you want to create your zclass in such a way, that it can only
hold images and instances of itself, because instances of itself can
recursively only hold images, and instances of itself...

see the difference?


hope this helps,
Heiko

-- 
heiko.stoermer@innominate.de
                                                        innominate AG
                                                     networkingpeople
fon: +49.30.308806-0 fax: -77               web: http://innominate.de