Re: Newbie - passing a list to an External Method
If I set the External Method parameters to (self, fileID, Lines), and call it in this manner: <dtml-let link="sping2(fileID='myPDFfile.pdf',lines=mylines)"> (sping2 being the ID of the External Method - and the external method returning the fileID that is passed in as the filename to generate) I get the following error:
Error Type TypeError Error Value run() takes exactly 3 non-keyword arguments (0 given) I think that you're defining your method like this: def sping2(self,fileID,lines):
but in your call you're saying that the parameters are optional: <dtml-let link="sping2(fileID='myPDFfile.pdf',lines=mylines)"> which isn't true. if they are not optional, then you have to call the method like this: <dtml-let link="sping2(fileID,lines)"> Otherwise, you have to define your method on this way: def sping2(self,fileID='my default',lines=['']) Regards, Josef
participants (1)
-
Josef Meile