[Zope] Problems running a Xron method

Loren Stafford lstafford@morphics.com
Wed, 21 Feb 2001 11:34:31 -0800


Well, I can't see where the problem is. Maybe somebody else can.

At this point, I would start tracing. You might want to start by
uncommenting the line

    #import pdb; pdb.set_trace() # debug

in the trigger method of Xron DTMLMethod.py. Then you can examine your
namespace, and maybe figure out what's missing.

Good luck.

-- Loren

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Chris
Muldrow
Sent: Monday, February 19, 2001 06:18
To: Loren Stafford; zope@zope.org
Subject: Re: [Zope] Problems running a Xron method


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


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