[Zope] Re: How about create another method other than index_html to get content in OFS::File?

Dieter Maurer dieter@handshake.de
Wed, 8 Nov 2000 21:30:27 +0100 (CET)


iap_y2fun.com writes:
 > My problem is that : I have a ZClass based on OFS::File.
 > I need to override the default index_html for my own purpose.
 > After I created my own index_html, I found myself can't access the content
 > of that object.
 > Since:
 > 1. I have no way to access the original method index_html of the base class
I, too, would wish that ZClasses provide access to overwritten
methods (as Python does).

 > 2. In OFS::File, There is no other method than index_html to access the
 > content of this object.
 > That's why I modify Image.py and add one line:
 > getContent=index_html
 > It's work for me.
For file objects, you can use "str(data)".

It won't work with images, though.



Dieter