[Zope-dev] multiple monkeypatches

Jerome Alet alet@librelogiciel.com
Wed, 5 Jun 2002 21:02:12 +0200


On Wed, Jun 05, 2002 at 05:15:10PM +0000, Florent Guillaume wrote:
> Jim Penny  <jpenny@universal-fasteners.com> wrote:
> > Is there a safe way to handle multiple monkeypatches?
> 
> Without an existing framework (I haven't looked at Adrian's PatchKit),
> it's the same old problem as "intercepting interrupts" on good old 8-bit
> computers. You just have to save and call the previous one.
> 
> What I do is this:
> 
> # 1. define my method
> def manage_main(...):
>     # ...
>     ...
>     res = self._myproduct_old_manage_main(...)

Yes, I remember ;-)

except that what we want to patch there is the user interface
HTML code itself. I think parsing the HTML code to insert 
some tags where needed would do it, but this seems 
somewhat complicated to do for a simple thing like that.

Would be fine if the main.dtml file would allow a plugin system...

bye,

Jerome Alet