Its the <dtml-with REQUEST>, that mucks up the namespace lookup for "value" <dtml-with REQUEST> <dtml-in "[1,2,3]"> <dtml-call "REQUEST.set('value', _['sequence-item'])"> Doesnt work:<dtml-var value>, works: <dtml-var "REQUEST['value']"> </dtml-in> </dtml-with> But with REQUEST is a rather wierd thing to do. Are you sure you want to do that? Cheers. -- Andy McKay. ----- Original Message ----- From: "R. David Murray" <bitz@bitdance.com> To: "Sidnei da Silva" <sidnei@x3ng.com.br> Cc: <zope-dev@zope.org> Sent: Tuesday, October 23, 2001 3:15 PM Subject: Re: [Zope-dev] BUG or FEATURE?
On Tue, 23 Oct 2001, Sidnei da Silva wrote:
I dont know how it was supposed to work, but i think that if the REQUEST was immutable inside a dtml-with, it should be not allowed to call REQUEST.set inside it.
It isn't immutable. The second and subsequent sets should work.
<dtml-call "REQUEST.set('var', sequence-item)"> <== only works first time it
Well, I don't know quite what you are observing, but this code is broken. Inside the quotes you are in python mode, and 'sequence-item' in python mode is the variable sequence minus the variable item. Since it didn't throw an error, you must have variables by those names that understand substraction.
Try _.getitem('sequence-item') instead.
I suspect this thread belongs on zope, not zope-dev.
--RDM
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )