[Zope-dev] "Problem" using External Method

Espen Sorbye Frederiksen ceeesf@cee.hw.ac.uk
Tue, 23 Jan 2001 22:52:51 +0000 (GMT)


The module below works using the python compiler
class Testclass:
    def setdata(self,val1,val2,val3):
        self.data = [val1,val2,val3]
    def updatedata(self, index):
        self.data[index] = self.data[index]+1
    def display(self):
        print self.data
    
x = Testclass() 
def createdata():
    import __main__
    __main__.x.setdata(10, 20, 30)
    __main__.x.updateLog(2)
    __main__.x.display()

>>>createdata()
>>>[10,20,31]

However if I try to add it as an External Method( id= createdata) it
doesn't
seem to work. I've tried to call it using <dtml-var/call createdata>
without success. Any suggestions what I do wrong.
I am grateful for all comments,

Espen