It seems to me that the problem here is in appearance. Although it seems that you're aquiring an index_html or searchResults in those cases, they are actually instantiated in scope just like anything else you'd add inside that particular object, you just can't see them. So you have two choices. Sub-class Tracker or Squishdot and override that way. OR Make a folder that contains the overridden methods and call things through the context of that folder. In the case of what it seems you want to do I'd say sub-classing is going to be your real answer. Hope that helps... Monty
>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 7/10/00, 4:11:08 PM, Chris Withers <chrisw@nipltd.com> wrote regarding [Zope-dev] Overriding a method in an instance.:
Hi,
I guess this should be a feature request for the collector but I thought I'd see what other people thought first...
I'd really like to be able to override methods in an instance of an object. Examples I can think of are Squishdot and the Tracker.
In Squishdot, or any ZCatalog for that matter, it'd be great to override searchResults to return what I want, formatted how I want.
In Tracker, the same could be said for index_html.
These may be bad examples, but hopefully you see what I mean...
Anyway, if you do try to override, you get a 'This id is already in use' error. How do you get around it and how should this problem be solved?
cheers,
Chris
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org 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 )