Steve Alexander wrote:

> Shane Hathaway wrote:
> 
> > 
> > I was suspicious of the entire method so I wrote a replacement which is
> > based on a new interface available in Zope.  I *think* it's correct,
> > but it's a drastic change so it's only in the new PTK and nowhere
> > else.  (This is slightly modified from PTK CVS.)
> > 
> >     def __url(self):
> >         return string.join(self.getPhysicalPath(), '/')
> 
> 
> The implementation of url() in CatalogAwareness.py in Zope 2.2.1 seems
> to ensure that there is a '/' at the start of the url that is given to
> the ZCatalog. I don't know how important that really is, though.
> 
> Perhaps your method should be changed to this:
> 
> def __url(self):
> return '/'+string.join(self.getPhysicalPath(), '/')

My mistake -- I just found out that getPhysiscalPath() returns a list 
with an empty string as the first element.

So, Shane's original version is just fine.

-- 
Steve Alexander
Software Engineer
Cat-Box limited
http://www.cat-box.net


_______________________________________________
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 )

Reply via email to