[Zope] ZClasses and default documents, and COM objects.
Michel Pelletier
michel@digicool.com
Thu, 22 Jul 1999 10:02:29 -0400
> -----Original Message-----
> From: Phil Harris [mailto:phil@philh.org]
> Sent: Thursday, July 22, 1999 3:30 AM
> To: zope@zope.org
> Subject: [Zope] ZClasses and default documents, and COM objects.
>
>
> Hi all,
>
> I'm just starting to look at zClasses again and am having
> some difficulty in
> setting up default documents within the zClass.
>
> Let's say that I create a CD Product and want that CD to have
> a 'index_html'
> so that it can render itself.
>
> Where would I put the document so that it appears as a
> default and alos is
> editable by the user at a later date?
You would need to make the object an ObjectManager, and have it's
constructor instantiate an index_html DTML Object in each instance of
your ZClass.
This is a point of confusion alot of people make. They think that the
things they put in the 'Methods' tab should show up in instances of
their objects like subobjects in a folder. This is not the case.
Objects in the Methods view are methods of the object. If you want a
user to be able to edit a method, you either have to build your own
editing interface (using methods) or make the object an ObjectManager to
contain editable objects (like DTML Documents).
-Michel