[Zope] Problems running a Xron method

Chris Muldrow muldrow@mac.com
Mon, 19 Feb 2001 09:18:11 -0500


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
> 
>