Anyone fooled around with Xron? I've got a DTMl method sitting in a folder that seems to work fine. When I copy the code into a Xron method and trigger it, though, it doesn't seem to work. i suspect some sort of Namespace trouble, but I'm not sure. -- thanks -- Chris
Give us something to go on. Show us your method. How doesn't it work? By "trigger", do you mean using the "trigger" tab or actually firing the scheduled event? -- Loren ----- Original Message ----- From: "Chris Muldrow" <muldrow@mac.com> To: <zope@zope.org> Sent: Sunday, February 18, 2001 7:05 PM Subject: [Zope] Problems running a Xron method
Anyone fooled around with Xron? I've got a DTMl method sitting in a folder that seems to work fine. When I copy the code into a Xron method and trigger it, though, it doesn't seem to work. i suspect some sort of Namespace trouble, but I'm not sure. -- thanks -- Chris
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Sorry--should've been more specific. Here's the method: <dtml-in expr="objectValues('DTML Document')"> <dtml-let newname="'o13'"> <dtml-let nameadd=id> <dtml-let newname="nameadd+newname"> <dtml-let newtitle="'Chris'"> <dtml-let story=document_src> <dtml-let credate="ZopeTime()"> <dtml-with "PARENTS[0]"> <dtml-call expr="addFLSNews(newname, story, credate)"> </dtml-with> </dtml-let> </dtml-let> </dtml-let> </dtml-let> </dtml-let> </dtml-let> </dtml-in> And here's the external method that it's calling: def addFLSNews(self, newid, data, REQUEST=None): """ """ # Get the actual destination object, using the this() # method, to be sure we get it in the right context.. self=self.this() # Create the new instance newob=self.Control_Panel.Products.FLSNewsStory.FLSNewsStory(data) newob._setId(newid) self._setObject(newid, newob) newob.title=getTitle(data) varStoryName=getStoryName(data) varUser=getUser(data) varPicID=getPicID(data) varCategory=getCategory(data) varLocality=getLocality(data) varBasket=getBasket(data) varNwords=getNwords(data) varEditionInfo=getEditionInfo(data) varSummary=getSummary(data) self._setProperty('User', varUser, type='string') self._setProperty('StoryName', varStoryName, type='string') self._setProperty('PicID', varPicID, type='string') self._setProperty('Category', varCategory, type='string') self._setProperty('Locality', varLocality, type='string') self._setProperty('Basket', varBasket, type='string') self._setProperty('Nwords', varNwords, type='string') self._setProperty('EditionInfo', varEditionInfo, type='string') self._setProperty('Summary', varSummary, type='string') It's hitting a problem at the self.setObject line. This method works when I run it as a regular DTML Document, but it hits an "Attribute Error on self.setObject when I run it as an Xron. I'm using the trigger tab, but I've also tried letting it run as scheduled--neither works. on 2/18/01 10:47 PM, Loren Stafford at lstaffor@dynalogic.com wrote:
Give us something to go on. Show us your method. How doesn't it work? By "trigger", do you mean using the "trigger" tab or actually firing the scheduled event?
-- Loren
----- Original Message ----- From: "Chris Muldrow" <muldrow@mac.com> To: <zope@zope.org> Sent: Sunday, February 18, 2001 7:05 PM Subject: [Zope] Problems running a Xron method
participants (2)
-
Chris Muldrow -
Loren Stafford