16 Sep
2003
16 Sep
'03
6:47 p.m.
Josef Meile wrote at 2003-9-16 13:59 +0200:
... If you use it inside the class definition, it will work because "self" it's an instance of the class, so it has access to the class attributes, but if it's outside, like the manage_addForm method, it won't:
_addFooForm=PageTemplateFile('zpt/Foo_Add',globals()) _addFooForm._owner=None
def manage_addFooForm(self,*args,**kw): """manage_addFooForm method""" kw['Kind']='Foo' return self._addFooForm(*args,**kw)
Use "_addFooForm.__of__(self)(*args,**kw)". Dieter