[Zope-dev] Re: Acquisition Wrappers Bit Again ;-)

Carl Robitaille robitail@giref.ulaval.ca
Thu, 17 Aug 2000 18:38:19 +0000


Hi Criss,
 
	Thanks a lot for your quick response!! Since I'm a new Zope user, I
guess I'll just cut-paste the line you suggest without trying to
understand for the moment....  ;-)

Carl


> Carl Robitaille wrote:
> >  <dtml-var "_.getitem('sequence-item')">
> >  <dtml-var "images">
> >  <dtml-var "_.getitem('sequence-item')==images">
> 
> > <Folder instance at 85cf958>
> > <Folder instance at 85cf958>
> 
> Congratulations, you've just been bitten by the thing that confused me
> for half a day...
> You see, while they say <Folder instance at 85cf958>, they're actually
> lying ;-)
> 
> The objects you're comparing are actually acquisition wrappers.
> 
> IMHO, == should work with acquisition to make problems like the above
> not happen. I suggested this, and Jim Fulton agreed:
> http://zope.nipltd.com/public/lists/dev-archive.nsf/ByKey/08240A8E0D50AEE0
> 
> Sadly, nothing seems to have been done about it :(
> Maybe you should chuck it in the collector as a bug in the
> ExtensionClass?
> 
> cheers,
> 
> Chris
> 
> PS: In the meantime, the following should work:
> 
>  <dtml-in "objectValues(['Folder'])">
> 
>   <dtml-if
> "_.getattr(_.getitem('sequence-item'),'aq_base',_.getitem('sequence-item'))==_.getattr(images,'aq_base',images)">
>     EQUAL
>   <dtml-else>
>     NOT EQUAL
>   </dtml-if>
> 
>  </dtml-in>