On 17 Feb 99, at 11:44, David Wagle wrote: Try this: <!--#var "dwtest()"--> I've made similar changes to my external functions and indeed, self.REQUEST works. However self.RESPONSE doesn't seem to work, so I still have to pass that explicitely. Anyone know why?
Ok, I thought I had a handle on this after Amos' message yesterday . . .but I clearly don't have a clue as to what is going on.
I have the following external method:
def dwtest(self,REQUEST=None): "find out what the hell is going on with REQUEST headers" if REQUEST is None and hasattr(self,'REQUEST'): REQUEST=self.REQEUEST return "REQUEST is None and hasattr(self,'REQUEST')" elif REQUEST is None and not hasattr(self,'REQUEST'): return "REQUEST is None. Self does not have attr REQUEST" elif REQUEST is not None and hasattr(self,'REQUEST'): return "REQUEST is not None. self has attr REQUEST" elif REQUEST is not None and not hasattr(self,'REQUEST'): return "REQUEST is not none. self does not have attr"
If I call it with the URL, I get the expected:
REQUEST is not None. self has attr REQUEST
If I call it with the DTML <!--#var "dwtest('REQUEST')"--> I get:
REQUEST is None. Self does not have attr REQUEST"
???
I am missing somethign really fundamental here, and I don't know what it is.
Help please. ...
daw
--------------------------------------------- A computer without Microsoft products is like a dog without bricks chained to its head ---------------------------------------------
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com ICQ: 14856937