27 Apr
2005
27 Apr
'05
7:47 p.m.
J Cameron Cooper wrote:
The method that contains your code must have at least the first parameter 'self'::
def pdfwrite(self): R = self.REQUEST.RESPONSE R.setHeader('content-type', 'application/rtf') R.setHeader('content-length', str(len(data))) R.write(data)
It's a way of getting access to context.
OK, thanks. But how can I pass the self parameter using the dtml-call tag? <dtml-call "pdfwrite(self)"> is correct? Because I'm using this and works fine. Fernando Lujan