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
_______________________________________________
Zope maillist - Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to