[Zope] Question about accessing properties of images

Kevin Carlson kevinc@carlson.homeip.net
Thu, 21 Feb 2002 12:56:43 -0500


The Key error occurs on pic.desc.  In other words:

<dtml-var pic.desc> fails with an error on 'pic.desc'.

<dtml-var expr="pic.desc"> returns an attribute error on 'desc' which is a
valid property that I have entered for the 'pic' object.

This works:

     <dtml-in objectItems prefix=p >
         <dtml-if expr="p_key == pic">
             <dtml-var desc html_quote>
         </dtml-if>
     </dtml-in>

Just seems like a performance waste to loop through the objectItems when I
have the key available.  Any other ideas?

Kevin

----- Original Message -----
From: "Dieter Maurer" <dieter@handshake.de>
To: "Kevin Carlson" <kevinc@carlson.homeip.net>
Cc: <zope@zope.org>
Sent: Wednesday, February 20, 2002 1:33 PM
Subject: Re: [Zope] Question about accessing properties of images


> Kevin Carlson writes:
>  > I get an invalid Key message from the server when I try and access the
page.
>  > Any ideas?
> For what key?
>
> I expect "pic.desc". In this case, you had forgotten the
> 'expr="..."' enclosure.
>  > > "<dtml-var expr="pic.desc" html_quote>" does not work?
>  > > What happens/goes wrong?
>
>
> Dieter