Curtis Maloney <[EMAIL PROTECTED]> wrote:

> Greetings,
> I am experimenting with my first ZClass.  I have inherited from
> Renderable, and XMLDocument.  I have added a few DTML Methods,
> including a 'render' method.
> Testing has been all well and good, with pages displaying
> predictably when I hit the View tag, but if I hit View in the
> folder, which contains one of my classes as index_html, it
> doesn't display correctly.

You are up against a known problem, i.e., that ZClass instances can't
function as directly-renderable objects:

The workaround is to download the contributed Renderable-ZClass

and derive your ZClass from the mix-in it provides (migrating an
existing ZClass to it is painful, but doable).

> My class relies on being able to find methods in itself (using
> _.hasattr() ), but the results are as if it cannot find any.  I
> thought this might be because render is a dtml Method, so I tried
> it as a DTML Document.  Now when trying to view it, it asks for
> authentication, and denies anyone (even the superuser).
> What am I doing wrong?  Shouldn't a ZClass member method be able
> to reference other members in the same ZClass?

Hmm, I don't know if this is the same problem;  I'm sure that you
can't have a ZClass instance function as the index_html for a folder
out-of-the-box, though.

Tres Seaver                          [EMAIL PROTECTED]
Digital Creations   "Zope Dealers"

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to