[Zope] Recursive method (Funny-peculiar)

Michel Pelletier michel@digicool.com
Sun, 22 Aug 1999 10:59:58 -0400


Roché Compaan wrote:
> 

> I think i found the solution.  I thought that my "standard_html_header" in
> my top level would suffice as the "start" method, and my "navigation" method
> is similar to the "voodoo" method.  My public interface "index_html" is a
> dtml document.  When i changed "index_html" to a dtml method everything
> worked.  So now from within "index_html" i just call "<!--#var
> #dtContent"--> to render the content.
> 
> It is still peculiar to me why "Objectvalues('Folder')" has no values when
> you call it from a dtml document but has values when you call it from a dtml
> method.  Why is this the case?
> 

I was just replying to your first message when I saw this, I was going
to guess that index_html was a DTML Document.

DTML Methods are methods of the folder that contains them.  So, if
'index_html' were a method, then when it called 'objectValues' it would
call it on the *folder* is is contained in.  A DTML Document, however,
has it's own objectValues method (because a DTML Document is an
*object*, not a *method* it can have it's own methods) which, because a
Document is not a container, will return nothing.

-Michel

> Roché (Somewhat smelling the Zen of Zope)