-----Original Message----- From: Butch Landingin [mailto:butchland@yahoo.com] Sent: Monday, March 08, 1999 9:24 PM To: tony.mcdonald@ncl.ac.uk Cc: Zope@zope.org Subject: [Zope] Re: Why doesn't this loop over files?
In a previous posting, Tony McDonald <tony.mcdonald@ncl.ac.uk> wrote:
Hi, I've d/led the ZopeDemos folder, installed it and started learning more about Zope, but there's something happening that I'm not sure about.
The 'looping' example doesn't seem to iterate correctly over new additions to the folder. The DTML is here: <... additional text deleted ...>
There's a bug in the code, something I noticed when I was playing with the examples too. this is the fixed version:
001 <!--#in "['Document','Folder']"--> 002 <!--#with subFolder--> 003 <!--#if "objectValues(_['sequence-item'])"--> 004 <H3>Objects of type <!--#var sequence-item--></H3> 005 <TABLE BORDER=1> 006 <TH>Id</TH><TH>Title</TH> 007 <!--#in "objectValues(_['sequence-item'])"--> 008 <TR><TD><!--#var id--></TD> 009 <TD><!--#var title--></TD></TR> 010 <!--#/in--> 011 </TABLE> 012 <!--#/if--> 013 <!--#/with--> 014 <!--#/in-->
About the bug and the fix: the bug was due to the statement <!--#if "objectValues(_['sequence-item'])"--> looping over the current folder, not the subFolder which it should be. By moving the "with" statement to enclose it (see line 002), the statement <!--#if "objectValues(... now loops over the objects inside the folder named "subFolder".
I don't know who is maintaining the ZopeDemos product (or if it's being maintained at all), but I hope he/she takes note of this and posts an update.
Can you submit this problem you noted to the Collector as a documentation request? http://www.zope.org/Collector
Hope this helps.
Butch Landingin butchland@yahoo.com
PS. I'm playing around with the Confera product (making it more slashdot-like) but I know it's not "officially supported" by Zope/DC -- so who's maintaining it? I have some detailed questions about the code (but I don't know if it's off-topic for Zope/Zope-dev).
Zope-dev is the place to ask specific questions about Zope's API and Zope Product Authoring. Go ahead and ask your questions, the unsuported just means we can't make any guarantees or commit company resources to it, but if your question happens to use Confera as it's basis all the better. Someone out there might have the answer. -Michel
_________________________________________________________ DO YOU YAHOO!? Get your free @yahoo.com address at http://mail.yahoo.com
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )