Re: [Zope] dtml-while

2000-10-30 Thread Dieter Maurer

Diego Rodrigo Neufert writes:
 > Why there isnt a dtml-while function in Zope?
 > How to implement it with dtml?
 > how to do a simple while x != y in dtml?
Because the Zope developers feared infinite loops created by
dumb users or malicious hackers in "through the web" content.
For the same reason, "_.range" has been cripled and the module
"re" is not exposed.


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] dtml-while

2000-10-29 Thread Steve Spicklemire


Hi Diego,

   DTML is set up with (some) care taken so that it can't run off with
the CPU and (possibly) take forever. Depending on the circumstances
you can probably get the effect of a 'while' using 'if'
statements. You'll probably need to convert your iteration logic so
that it looks like it's looping over a list of objects... one easy
trick might be:




 
   Do something conditional 

 




Assuming you can specify an upper limit on the number of
iterations required.

-steve

> "Diego" == Diego Rodrigo Neufert <[EMAIL PROTECTED]> writes:

Diego> Why there isnt a dtml-while function in Zope?  How to
Diego> implement it with dtml?  how to do a simple while x != y in
Diego> dtml?

Diego> Thanks in advance...

Diego> -- --- Diego Rodrigo Neufert
Diego> -webmaster --- (Magic Web Design)
Diego> (email) ([EMAIL PROTECTED]) (curitiba) (pr)

Diego> ___ Zope
Diego> maillist - [EMAIL PROTECTED]
Diego> http://lists.zope.org/mailman/listinfo/zope ** No cross
Diego> posts or HTML encoding!  ** (Related lists -
Diego> http://lists.zope.org/mailman/listinfo/zope-announce
Diego> http://lists.zope.org/mailman/listinfo/zope-dev )


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] dtml-while

2000-10-29 Thread Michel Pelletier

Diego Rodrigo Neufert wrote:
> 
> Why there isnt a dtml-while function in Zope?

DTML is not meant to be used for general purpose, logic programming. 
It's a presentation and layout language.  Additionally, a while
construct would allow you to create indeterminate loops:


 ...


and you're not allowed to loop indefinately in DTML.  It's against the
rules.   does all the looping you need over a python sequence,
since DTML doesn't let you build infinite sequences, all loops
terminate.

The solution to your problem is to you Python Methods.

http://dev.zope.org/Members/4am/PythonMethod

Python does have a while construct and is indented for programming
logic.

-Michel

___
Zope maillist  -  [EMAIL PROTECTED]
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 )




RE: [Zope] dtml-while

2000-10-29 Thread hohage

Hallo Diego,
this works(tested):


  

  


Bye
  Sven

>= Original Message From Diego Rodrigo Neufert 
<[EMAIL PROTECTED]> =
>Why there isnt a dtml-while function in Zope?
>How to implement it with dtml?
>how to do a simple while x != y in dtml?
>
>Thanks in advance...
>
>--
>---
>Diego Rodrigo Neufert
>-webmaster
>---
>(Magic Web Design)
>(email) ([EMAIL PROTECTED])
>(curitiba) (pr)
>
>___
>Zope maillist  -  [EMAIL PROTECTED]
>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 )



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] dtml-while

2000-10-29 Thread Diego Rodrigo Neufert

Why there isnt a dtml-while function in Zope?
How to implement it with dtml?
how to do a simple while x != y in dtml?

Thanks in advance...

-- 
---
Diego Rodrigo Neufert
-webmaster
---
(Magic Web Design)
(email) ([EMAIL PROTECTED])
(curitiba) (pr)

___
Zope maillist  -  [EMAIL PROTECTED]
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 )