Waheyy!  Thanks Chrises, the Withers solution worked a treat.

I don't actually thing that sequence-item _is_ called when it's
assigned. I tried inspecting it with all sorts of python and it's
definitely a string as soon as you even mention it.  It looks to me like
it's rendered before you can access any of its attributes.  I'm still a
relative stranger to the Zope architecture, and I've got a deadline to
meet, so I can't go look at the code right now.  However, surely this
behaviour _is_ a bug?  I would expect sequence-item consistently to
behave like the object to which it refers.

> Welcome to DTML...

Sounds ominous ;)

I've just starting actually using Zope in production, and I'm constantly
surprised by it.  I can spend about 5 hours on a little problem like
this, and just when I start thinking "stupid system" and reach for
mod_php + mysql, I suddenly find I've done something that would normally
take me a couple of days to implement in about 10 minutes.  Welcome to
Zope, eh?


> what's happening, I guess, is that when you do
> <dtml-let thing=sequence-item>
> sequence-item is called (and hence rendered to a string) which screws
> thigns up.
> try:
> > <dtml-in "objectValues('Foo Thing')">
> >         <dtml-let thing="_.getitem('sequence-item',0)>
> >                 <dtml-var "thing.id()">
> >         </dtml-let>
> > </dtml-in>
> cheers,
> Chris

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

Reply via email to