Re: [Zope-dev] Execution context
Garito wrote: def __bobo_traverse__(self, Request, Name): import sys if sys._getframe(1).f_code.co_name == traverse: return getattr(self, Name) else: return self.Propiedad(Name) Ew... some sick part of me want to ask WHY you're doing thing... Then again, some people like beating each other with sticks for fun, other people program in Perl, each to their own I guess... cheers, Chris -- Simplistix - Content Management, Zope Python Consulting - http://www.simplistix.co.uk ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Execution context
Hi all Finally I solve my problem with Tres Seaver's help (THANK YOU) I overridethe __bobo_traverse__ with: def __bobo_traverse__(self, Request, Name):import sysif sys._getframe(1).f_code.co_name == "traverse":return getattr(self, Name)else:return self.Propiedad(Name) self.Propiedad is the fuction than neutralices (I call these mechanism Neutralization) the content of my object When You executes ZMI sys._getframe(1).f_code_co_name returns traverse Thanks again Tres Seaver! ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Execution context
Hi all Can I know the execution contexto of an object? I would like to know if the object is call by ZMI or DTML or Page Templates etc is it posible? Thank you ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )