[Zope-dev] Comparing folder instances

Carl Robitaille robitail@giref.ulaval.ca
Thu, 17 Aug 2000 17:46:15 +0000


Hi,

	A quick question. How do I compare folder instances ?(or any instances
as a matter of fact).

	Here is a simple code showing what I tried:

<dtml-in "objectValues(['Folder'])">

 <dtml-var "_.getitem('sequence-item')">
 <dtml-var "images">
 <dtml-var "_.getitem('sequence-item')==images">

</dtml-in>

	Here is now the resulting HTML


<Folder instance at 85cf958>
<Folder instance at 85cf958>
0


<Folder instance at 858a168>
<Folder instance at 85cf958>
0

	Why isn't the first comparison returning true? What I want to use is
something like:


<dtml-in "objectValues(['Folder'])">

 <dtml-if "_.getitem('sequence-item')==images">
   EQUAL
 <dtml-else>
   NOT EQUAL
 </dtml-if>

</dtml-in>

	Thanks a lot in advance for your comments.

Carl