[Zope] ZCatalog (2.3.1) won't acquire method from parent fold er?

sean.upton@uniontrib.com sean.upton@uniontrib.com
Mon, 14 May 2001 08:56:07 -0700

Casey Duncan Wrote:
Solution: write a wrapper method in your class that looks for a DTML
method to index against. If it finds one then call it or a default DTML
method passing self as the client like so:

defaultSearchTextWeighted = Globals.HTMLFile('dtml/searchTextWeighted',
def searchText(self):
	"""Look for a DTML Method to call"""
	if hasattr(self, 'searchTextWeighted'):
		stw = self.searchTextWeighted
		stw = self.defaultSearchTextWeighted

	return stw(self)

Forgive my ignorance here, but this will evaluate/render the method (using
the correct context of the class instance itself), and proxy the rendered
method to the catalog machinery because it is a python class, post-rendered?
Or is it that this wrapper returns the DTML method itself, wrapped in a
correct context by which catalog renders the method?