Florent Guillaume writes:
 > Anyway I'd propose the following: we need, in constructInstance, to
 > somehow pass the portal_type to the object constructor. Unfortunately
 > this has to be backwards-compatible with all the constructors out there
 > that don't know about it. I see two possible ugly solutions to do it:
 >   - do "constructor.__portal_type = portal_type" before calling
 >     constructor(...), and the constructor does something like:
 >     def manage_addFoo(...):
 >       try:
 >         portal_type = manage_addFoo.__portal_type
 >         manage_addFoo.__portal_type = None
 >       except:
 >         portal_type = None
Usually, this dynamic modification is not a good idea in a multi-threaded

If "constructor" is (part of) a persistent object, it might work in
Zope but may entail unnecessary writes to the ZODB.


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

Reply via email to