[Zope] Name lookup emulation with a Product
Chris Withers
chrisw@nipltd.com
Tue, 17 Oct 2000 12:49:39 +0100
Pierre-Julien Grizel wrote:
>
> I looked at the __call__ method (and read the 'isDocTemp' thread ;-) )
> and, if I must, I can replace m1 and m2 with a __call__ method taking
> another parameter specifying what kind of action it has to do.
>
Well, there's another little gem which got covered in a later bit of
that thread. Try defining your method like:
m1isDocTemp=1
def m1(self,ignored,md):
# Your method here
Also, check out the code in:
<http://www.zope.org/Members/htrd/howto/FunctionTemplate>
which is really helpful in this area. In fact, a FunctionTemplate may be
exactly what you're looking for...
HTH,
Chris