[Zope] a question on external methods

David Wagle david.a.wagle@healthpartners.com
Tue, 16 Feb 1999 16:46:28 -0600 (CST)


Amos Latteier writes:
 > At 01:42 PM 2/16/99 -0600, David Wagle wrote:
 

 > >When I use them in a test file:
 > >
 > ><!--#var standard_html_header-->
 > >
 > ><!--#var test.xm-->
 > ><!--#var test2.xm-->


 > The problem is a common one.

 > 
 > Invoking a method via a URL is *not* the same as invoking a method by using
 > the var tag in DTML.
 
Ok - all this made a great deal of sense, and I felt I was armed with
some good info . . .but . . .

 > Another solution is to not get the REQUEST from the arguments. This way
 > your method can be called both from DTML and from the ORB.
 > 
 > def dwName(self,REQUEST=None):
 >     "find the authenticated user"
 >     if REQUEST is None and hasattr(self,'REQUEST'):
 >         REQUEST=self.REQUEST
 >     return "%s" % self.REQUEST['AUTHENTICATED_USER']
 > 
 > This works. . . .

ummm, no it doesn't . . .

dwName is defined EXACTLY as you have it here. It is located in the
./Extentions directory in the file dwxm.py. 

test2.xm is defined as an external method that calls dwName from that
file.
test.xm calls dwTime from that file.

Again, <!--#var test2.xm--> bombs. doing <!--#var "dwName()"--> dies
as well.

Again calling it from the external methods tab works just fine.

What am I missing.


---------------------------------------------
A computer without Microsoft products is like
a dog without bricks chained to its head
---------------------------------------------

-- 
---------------------------------------------
A computer without Microsoft products is like
a dog without bricks chained to its head
---------------------------------------------

-- 
---------------------------------------------
A computer without Microsoft products is like
a dog without bricks chained to its head
---------------------------------------------