I have the following Initialize method: def Initialize(self, REQUEST): self.count = 0 REQUEST=REQUEST.set('count', self.count) self.propertysheets.Properties.manage_changeProperties(REQUEST) self.extendedIPlist = "" REQUEST=REQUEST.set('extendedIPlist', self.extendedIPlist) self.propertysheets.Properties.manage_changeProperties(REQUEST) datetmp = os.popen("date", 'r') self.dateOfInit = datetmp.readlines()[0] datetmp.close() splitdate = string.split(self.dateOfInit) day = splitdate[2] month = splitdate[1] year = splitdate[5] self.dateOfInit = "" while count < len(datefmt): element = datefmt[count] if element == "D": self.dateOfInit = self.dateOfInit + day elif element == "M": self.dateOfInit = self.dateOfInit + month elif element == "Y": self.dateOfInit = self.dateOfInit + year else: self.dateOfInit = self.dateOfInit + element count = count + 1 REQUEST=REQUEST.set('dateOfInit', self.dateOfInit) self.propertysheets.Properties.manage_changeProperties(REQUEST) return I call Initialize by: <!--#var standard_html_header--> <dtml-with WebSolveAccess> <dtml-call "Initialize(this(), REQUEST)"> </dtml-with> <!--#var standard_html_footer--> Unfortunately I get the following error when using it: Error Type: AttributeError Error Value: 'None' object has no attribute 'set' It sounds to me like REQUEST=None, but I don't know where that's coming from... Any ideas of what is wrong with this? Thanks! Donner
Don't "REQUEST=REQUEST.set...", that's what wipes it out. Just "REQUEST.set(...". ----- Original Message ----- From: Donald Holten <donner@biophysics.lanl.gov>
I have the following Initialize method: def Initialize(self, REQUEST): self.count = 0 REQUEST=REQUEST.set('count', self.count) [snip]
participants (2)
-
Donald Holten -
Evan Simpson