[Zope] Looping construct for DTML
Jim Sanford
jsanford@atinucleus.com
Sat, 22 Jan 2000 07:17:08 -0600
A "maxtime" property could be added to the dtml-while construct that would have a default (15 seconds?) that could be overidden with
a specific value in the tag i.e. <dtml-while expr maxtime=25> this would preclude an infinite loop and triggering of maxtime could
return an error showing current state of the test expression as well as # of loops actually executed.
----- Original Message -----
From: J C Lawrence <claw@kanga.nu>
To: <zope@zope.org>
Sent: Saturday, January 22, 2000 2:53 AM
Subject: [Zope] Looping construct for DTML
Is there any chance of a looping construct for DTML?
Fairly often I find I need to do a pretty simple piece of looping
control, for instance repetitively popping items off the URL path
under SiteAccess to do something with them, and I find that I have
everything I need under DTML except a <dtml-while expr>. I know I
could do an embedded method, but the task is *really* lightweight
and obvious, and going to a whole other method for a little bit of
string-fu seems overkill.
Perfect would be:
<dtml-while "expr">
</dtml-while>
Yes, I realise the dangers of infinite loops. Simple limit controls
should handle that tho.
--
J C Lawrence Home: claw@kanga.nu
----------(*) Other: coder@kanga.nu
--=| A man is as sane as he is dangerous to his environment |=--
_______________________________________________
Zope maillist - Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )