[Zope] Problem with passing objects from External Methods

Jason Joy kyroraz@usa.net
10 Apr 2001 13:16:23 MST


This one has been driving me a bit crazy and I think there is a simple
solution to this.  I have written an external method to return a list of
objects back to a DTML method which executes the code via a dtml-in.

The dtml code looks like:

<dtml-in processMethod(passthis)>
<dtml-var sequence-index><dtml-var data><BR>
</dtml-in>

And this is passthis.py:

import string, regex

def passthis(passed):
   class element:
      pass
   info =3D []
   structures =3D string.split(passed)
   for structure in structures:
      bit =3D element()
      ## Get Information here, and store it in foo.
      bit.data =3D foo
      bit.source =3D structure
      info.append(bit)
   return(info)

---

When I run the code, I get a box that asks me to revalidate my Zope login=
 and
nothing works, finally, the system gives up and gives me an error with th=
is at
the bottom:

File /usr/local/Zope-2.3.0/lib/python/AccessControl/ZopeSecurityPolicy.py=
,
line 168, in validate
Unauthorized: data

Does anyone have any advice on this one?  This is an example of what I am=

doing and I need to pass a list of objects (with about 10 properties on e=
ach)
to be run through a dtml-in.

Thanks,

Jason


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=3D=
1