[Zope] - Do I have to explicitely pass REQUEST to external fu
nction?
Brian Lloyd
Brian@digicool.com
Wed, 27 Jan 1999 09:27:22 -0500
> I have an external python function, who's header starts like this:
>
> def Toggle(self, var='a', optvar=None,trueval=None,
> falseval=None, REQUEST=None,RESPONSE=None):
> "Toggle Test based on cookies and URL"
>
>
> I call it from dhtml, like this:
>
> <!--#call "Toggle(var='TogA',optvar='rowcount',trueval=99,falseval=5,
> REQUEST=REQUEST,RESPONSE=RESPONSE)"-->
>
>
> If I don't use REQUEST=REQUEST,RESPONSE=RESPONSE
>
> I get read-only buffer, class exception.
>
> Is this the way it's expected to function?
>
> I can also call this function as
>
> <!--#if "Toggle(var='TogA',
> REQUEST=REQUEST,RESPONSE=RESPONSE)"-->
>
> Same deal, must have REQUEST.
>
> Is there any way I can avoid explicitely passing REQUEST and
> RESPONSE?
If you dont use REQUEST or RESPONSE in the method, then you
dont have to pass it in. If you use them though, then they
need to be passed in like any other argument.
Brian Lloyd brian@digicool.com
Software Engineer 540.371.6909
Digital Creations http://www.digicool.com