[Zope] Renderable Base ZClass

Brian Lloyd Brian@digicool.com
Tue, 2 Nov 1999 09:46:39 -0500


> >If there is no way to pass REQUEST to __str__(), I believe this is a
> >minor shortcoming and should be remedied in the Zope DTML 
> core. Such as
> >by testing for the presence of an alternative method called
> >__render__(), for example, and using that instead.

While it is not passed explicitly, remember that REQUEST
can almost always be accessed through acquisition:

def __str__(self):
  theRequest=self.REQUEST
  ...
  return theResult


> Below is a forward of a discussion about the Renderable Base 
> ZClass Product
> and how it could be integrated into the ZOPE Core.
> 
> I'd like to see it incorporated into ZClasses - Under the 
> "Basic" tab of the
> ZClass, having a selectlist labelled "Render Method" from 
> which you'd choose
> the DTML method to be be displayed when the object is called 
> as <!--#var
> myObject-->.
> 
> Can anyone offer suggestions or comments as to a better way 
> to accomplish
> this?

After reading this, I'm not sure I understand what the core
problem is - is it that the REQUEST was not available as an
explicit argument, or am I missing something deeper here?



Brian Lloyd        brian@digicool.com
Software Engineer  540.371.6909              
Digital Creations  http://www.digicool.com