[Zope-dev] ZCatalog and indexing DTML methods

Stuart 'Zen' Bishop zen@cs.rmit.edu.au
Sun, 17 Oct 1999 10:04:35 +1000 (EST)


Greetings.

I need to use ZCatalog to index computed values of my ZClass.
It seems that ZCatalog will happily call DTML methods and index
their output, but the DTML methods are not called with any arguments
so cannot do very much.

At the moment, I'm having to shadow the output of my DTML methods (eg.
return the Id of PARENTS[1] type stuff) in property sheets to achieve
the required functionality, but this is ugly.

Is this sort of thing possible with ZClasses, or is this where it
is worth switching to Python classes?

Would it be possible to modify Catalog to do this? I think the
necessary section to modify would be recordify in Catalog.py.
The first argument to a DTML Method call would just be the object
passed to recordify. I'm unsure how to fake up the REQUEST attribute
though. Is this the right way to proceed? 

 ___
   //     Zen (alias Stuart Bishop)     Work: zen@cs.rmit.edu.au
  // E N  Senior Systems Alchemist      Play: zen@shangri-la.dropbear.id.au
 //__     Computer Science, RMIT 	 WWW: http://www.cs.rmit.edu.au/~zen