Hello. Zope is flagging me with a 'Key Error' when I try to execute the following code. <dtml-let numberDegrees="REQUEST.get('numberDegrees')"> <dtml-in "_.range(0, _.int(numberDegrees), 1)"> <dtml-let degree_description="REQUEST.form['degree_description_<dtml-var sequence-item>']"> </dtml-let> </dtml-in> </dtml-let> The variables designated by degree_description_<dtml-var sequence-item> are being successfully passed into this DTML method from a DTML document. However, I don't know any other way of accessing them within the loop. Any help would be greatly appreciated. Thanks. - Asad
You cant use tags inside a tag, try this: <dtml-let degree_description="REQUEST.form["degree_description_%s" % _['sequence-item'] ]"> Best regards... ----- Original Message ----- From: "Asad Habib" <ahabib@engin.umich.edu> To: <zope@zope.org> Sent: Thursday, January 08, 2004 2:11 PM Subject: [Zope] Key Error
Hello. Zope is flagging me with a 'Key Error' when I try to execute the following code.
<dtml-let numberDegrees="REQUEST.get('numberDegrees')"> <dtml-in "_.range(0, _.int(numberDegrees), 1)"> <dtml-let degree_description="REQUEST.form['degree_description_<dtml-var sequence-item>']"> </dtml-let> </dtml-in> </dtml-let>
The variables designated by degree_description_<dtml-var sequence-item> are being successfully passed into this DTML method from a DTML document. However, I don't know any other way of accessing them within the loop. Any help would be greatly appreciated. Thanks.
- Asad
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Obviously it dont work too, i used 2 " in the expression, try this instead: <dtml-let degree_description="REQUEST.form['degree_description_' + _['sequence-item'] ]"> ----- Original Message ----- From: "Mauricio Souza Lima" <mauricio.lima@varig.com> To: "Asad Habib" <ahabib@engin.umich.edu>; <zope@zope.org> Sent: Thursday, January 08, 2004 3:16 PM Subject: Re: [Zope] Key Error
You cant use tags inside a tag, try this: <dtml-let degree_description="REQUEST.form["degree_description_%s" % _['sequence-item'] ]">
Best regards...
----- Original Message ----- From: "Asad Habib" <ahabib@engin.umich.edu> To: <zope@zope.org> Sent: Thursday, January 08, 2004 2:11 PM Subject: [Zope] Key Error
Hello. Zope is flagging me with a 'Key Error' when I try to execute the following code.
<dtml-let numberDegrees="REQUEST.get('numberDegrees')"> <dtml-in "_.range(0, _.int(numberDegrees), 1)"> <dtml-let degree_description="REQUEST.form['degree_description_<dtml-var sequence-item>']"> </dtml-let> </dtml-in> </dtml-let>
The variables designated by degree_description_<dtml-var sequence-item> are being successfully passed into this DTML method from a DTML document. However, I don't know any other way of accessing them within the loop. Any help would be greatly appreciated. Thanks.
- Asad
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Hello. Thanks for your help. I tried the second method but that didn't work either. Any other suggestions? - Asad On Thu, 8 Jan 2004, Mauricio Souza Lima wrote:
Obviously it dont work too, i used 2 " in the expression, try this instead: <dtml-let degree_description="REQUEST.form['degree_description_' + _['sequence-item'] ]">
----- Original Message ----- From: "Mauricio Souza Lima" <mauricio.lima@varig.com> To: "Asad Habib" <ahabib@engin.umich.edu>; <zope@zope.org> Sent: Thursday, January 08, 2004 3:16 PM Subject: Re: [Zope] Key Error
You cant use tags inside a tag, try this: <dtml-let degree_description="REQUEST.form["degree_description_%s" % _['sequence-item'] ]">
Best regards...
----- Original Message ----- From: "Asad Habib" <ahabib@engin.umich.edu> To: <zope@zope.org> Sent: Thursday, January 08, 2004 2:11 PM Subject: [Zope] Key Error
Hello. Zope is flagging me with a 'Key Error' when I try to execute the following code.
<dtml-let numberDegrees="REQUEST.get('numberDegrees')"> <dtml-in "_.range(0, _.int(numberDegrees), 1)"> <dtml-let degree_description="REQUEST.form['degree_description_<dtml-var sequence-item>']"> </dtml-let> </dtml-in> </dtml-let>
The variables designated by degree_description_<dtml-var sequence-item> are being successfully passed into this DTML method from a DTML document. However, I don't know any other way of accessing them within the loop. Any help would be greatly appreciated. Thanks.
- Asad
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
On Thu, 2004-01-08 at 10:40, Asad Habib wrote:
Hello. Thanks for your help. I tried the second method but that didn't work either. Any other suggestions?
At the risk of repeating myself, I'll make the same suggestions I made last time you had this problem: 1. Always use the "prefix" attribute of dtml-in. 2. Don't introduce variables until your loop works with dummy values. FWIW, Dylan
participants (3)
-
Asad Habib -
Dylan Reinhardt -
Mauricio Souza Lima