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

2000-08-17 Thread Carl Robitaille

Hi,

Just for the record, Criss' suggestion didn't work for me. I don't
quite get why though Here's the code again, where images is a
Folder:


 
 
  
EQUAL
  
NOT EQUAL
  
 
 

The error I get from Zope is:

File /home/zope/Zope2/lib/python/DocumentTemplate/DT_Util.py, line 337,
in eval
  (Object:
_.getattr(_.getitem('sequence-item'),'aq_base',_.getitem('sequence-item'))==_.getattr(images,'aq_base',images))
  (Info: images)
File , line 0, in ?
File /home/zope/Zope2/lib/python/DocumentTemplate/DT_Util.py, line 140,
in careful_getattr
AttributeError: aq_base

It's looks like aq_base is not available. I read Shane's Acquisition
Understander How-To. I created the ExternalMethod that used aq_base and
it works like a charm. I tried a lot of things even if I didn't have a
good undersanding of the problem. The only time I got a valid code (Zope
not complaining when hitting the Change button) was with that line:

  

You probably know why it doesn't give the right result, but I don't
have a clue. It's still not returning true when sequence-item is
matching the images Folder. Is there anything I can read to understand
what I'm dealing with? Or maybe somebody knows what I'm doing wrong...
again


Carl


> Carl Robitaille wrote:
> > 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  ;-)
> 
> Nih!
> 
> Welcome to the deep end ;-)
> 
> cheers,
> 
> Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )




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

2000-08-17 Thread Chris Withers

Carl Robitaille wrote:
> 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  ;-)

Nih!

Welcome to the deep end ;-)

cheers,

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )




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

2000-08-17 Thread Carl Robitaille

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:
> >  
> >  
> >  
> 
> > 
> > 
> 
> Congratulations, you've just been bitten by the thing that confused me
> for half a day...
> You see, while they say , 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:
> 
>  
> 
>
>"_.getattr(_.getitem('sequence-item'),'aq_base',_.getitem('sequence-item'))==_.getattr(images,'aq_base',images)">
> EQUAL
>   
> NOT EQUAL
>   
> 
>  

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )