[Zope] ReturnValue of ExternalMethod
Jeffrey Shell
Jeffrey@digicool.com
Wed, 28 Jul 1999 14:34:32 -0400
-----Original Message-----
From: vanroose wim [mailto:vanroose@ruca.ua.ac.be]
I have an ExternalMethod Article that may only be called once.
But I want to use the returnvalue, a string, in two places.
Use of namespace doesnot solve the problem
<!--#with "_.namespace(story_id=Article)"-->
<!--#var story_id-->
<!--#var story_id-->
<!--#/with-->
The function is still called Twice
Instead, use the namespace to assign the result of the function to
'story_id',
<!--#with "_.namespace(story_id=Article())"-->
<!--#var story_id--> <!--#var story_id-->
<!--#/with-->
This way, you only call the function once (in the namespace call) and
assign its result to story_id. Thus, when you #var story_id it's just
displaying a string and not calling a method.