I am in the process of developing a product that patches the Folder class
at runtime - the Hotfix way. I append an additional tab to the Folder
class' manage_opions from the __init__.py of my product. While this works
fine for standard Folders and the Folder derived products I've tested,
ZPattern's Folder w/Customizer Support is giving me headaches.

I tracked it down to this code in the CustomizerFolder class:

    # We want to look like a folder, but with extra tabs after 'Contents'

    manage_options_left = Folder.manage_options[:1]
    manage_options_right = Folder.manage_options[1:]

So they manage to whack off the original manage_options before I can patch
them, sigh. ;)

I am not sure about the order of events here. Is there such a thing as
product initialization order? Will code like the above always use the
"hardwired" attributes of a class definition, and never any hotfixed

How about coding style then. What is considered worse, hotfixing or
refusing to be hotfixed? ;)


Things work better when plugged in

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to