[Zope-dev] context bindings in python products
Toby Dickenson
tdickenson@geminidataloggers.com
Wed, 06 Jun 2001 11:15:59 +0100
On Tue, 05 Jun 2001 15:56:45 -0400, Chris McDonough
<chrism@digicool.com> wrote:
>context =3D self
>container =3D self.aq_inner.aq_parent
No amount of aquisition trickery will give a method access to the dtml
context, which I *think* is what was asked for.....
>> the only thing i found was this:
>> http://www.zope.org/Members/htrd/howto/FunctionTemplate
>> but it seems very complicated in argument passing
Like DTMLMethods, all arguments get passed in the 'context'.=20
>> am i the only one who needs this, or is it a sign for wrong coding =
practice
>> in zope?
Context-based programming is usually wrong, but not always. If you
explain what you are trying to achieve then we may be able to point
out a better alternative.
(some early drafts of the Zope book encouraged context-based
programing in scenarious where it was quite dangerous; Im not sure if
this is currently true)
Toby Dickenson
tdickenson@geminidataloggers.com