[Zope-CMF] Monkey patching doesn't seem to work

Raphael Ritz r.ritz@biologie.hu-berlin.de
Wed, 19 Mar 2003 09:13:31 +0100


suresh_vv wrote:

>I want to make PortalFolders searchable.
>
>So:
>
>1. I created my version of MyPortalFolder.py in MY products directory,
>2. imported the CMFCore version of PortalFolder
>3. wrote a function mySearchableText
>4. Set PortalFolder.SearchbleText = mySearchableText
>5. imported MyPortalFolder.py in MY __init__.py
>6. Restarted Zope
>
>No improvement. But if I change the PortalFolder.py in CMFCore 
>directory, it works!
>
Not sure whether this is related but PortalFolder overwrites
'(re)indexObject()' to do nothing. Take SkinnedFolder instead.

Raphael

>
>Why cant I make it happen thru the "magic" of Monkey Patching? 
>
>So I can easily upgrade in future.
>I got the idea from a HOW-TO in "Caseman"'s home page.
>
>Thanks for any help.
>
>Suresh
>
>
>_______________________________________________
>Zope-CMF maillist  -  Zope-CMF@zope.org
>http://mail.zope.org/mailman/listinfo/zope-cmf
>
>See http://collector.zope.org/CMF for bug reports and feature requests
>
>  
>