[Zope] Some basic questions concerning ZClasses

Kevin Dangoor kid@kendermedia.com
Sat, 25 Mar 2000 15:35:56 -0500


----- Original Message -----
From: "Joachim Werner" <joachim.werner@iuveno.de>
To: <zope@zope.org>
Sent: Saturday, March 25, 2000 12:03 PM
Subject: [Zope] Some basic questions concerning ZClasses


> I've just started to work with ZClasses. They are really cool. But I am
running
> into some problems:

Make sure you read through the ZClasses tutorial. You may also want to check
out Loren Stafford's propertysheets howto.

> I added a folder to my ZClass. Let's say the folder contains images. Using
the
> images from the folder in my ZClass methods works fine. But like all other
> ZClass "internals" (methods etc.) the folder (correctly speaking: its
> instance; or is there no seperate instance of the folder???) is invisible
to the
> management interface.

To make a Folder show up in the ZClass instance, you should create it from
the ZClass_add method. For example, if your ZClass is called Foo, in the
method Foo_add, you could put a line:

<dtml-call "manage_addFolder('MyFolder')">

Then, every instance will have a folder called MyFolder in it.

> Is it possible to make a folder visible in the management interface so
that
> a user can enter additional images? Same with dtml methods/documents ...

Same thing applies for DTML methods/documents. Check out KM|Net News if you
want to see one way to provide default documents that the user can change.
KMNN also provides a way for the user to revert to the default.

> Is it true that the methods of a ZClass don't open a new property
namespace for
> each instance? If I change the property of a method in one instance it
seems to
> be globally changed.

Your properties should be stored on ZClass propertysheets. Then the
properties can vary from instance to instance.

Kevin