[Zope] Problem with passing objects from External Methods
Chris McDonough
chrism@digicool.com
Thu, 12 Apr 2001 10:36:32 -0400
Hi Jason,
This turned out to be a bug in Zope's ClassSecurityInfo implementation. A
fix has been checked in to the release
(http://lists.zope.org/pipermail/zope-checkins/2001-April/005941.html). You
can either patch your current release or wait for 2.3.2... I tested your
method against the fix and it works...
HTH,
- C
----- Original Message -----
From: "Jason Joy" <kyroraz@usa.net>
To: "Chris McDonough" <chrism@digicool.com>
Sent: Wednesday, April 11, 2001 4:55 PM
Subject: Re: [Re: [Re: [Re: [Re: [Zope] Problem with passing objects from
External Methods]]]]
No problem Chris, I thank you for taking your time to peek at this. And I
thought it was only fair since I rebuilt it a bit (hense the update) that
you
should have the results of that rebuild. Sometimes, rebuilding it seems to
fix programming problems, but no luck this time.
Many thanks,
Jason
"Chris McDonough" <chrism@digicool.com> wrote:
Thanks so much for this summary... I haven't had time to look into this yet
today, sorry Jason! But I promise I will look in to it tonight or tomorrow.
Sorry for the shifting ETA,
- C
----- Original Message -----
From: "Jason Joy" <kyroraz@usa.net>
To: "Chris McDonough" <chrism@digicool.com>
Sent: Wednesday, April 11, 2001 4:30 PM
Subject: Re: [Re: [Re: [Re: [Zope] Problem with passing objects from
External Methods]]]
Chris,
Thank you for all your help thus far with this particularly irritating
problem. I thought that I probably should give you a cleaner image of what
I
am trying to do and clean up things a little bit.
DTML:
<dtml-var standard_html_header>
<dtml-in processMethod>
<dtml-var sequence-index><dtml-var data><BR>
</dtml-in>
<dtml-var standard_html_footer>
Python: (ProcessMethod)
import string, regex
from AccessControl import ClassSecurityInfo
from Acquisition import Implicit
import Globals
class element(Implicit):
security = ClassSecurityInfo()
security.declareObjectPublic()
security.setDefaultAccess('allow')
def passthis():
info = []
passed = "asdf sdfa dfas"
structures = string.split(passed)
for structure in structures:
bit = element()
bit.data = "foo"
bit.num = structure
bit.source = structure
info.append(bit)
return(info)
Globals.InitializeClass(element)
--- The Traceback ---
Error Type: TypeError
Error Value: call of non-function (type string)
Traceback (innermost last):
File /usr/local/Zope-2.3.0/lib/python/ZPublisher/Publish.py, line 222, in
publish_module
File /usr/local/Zope-2.3.0/lib/python/ZPublisher/Publish.py, line 187, in
publish
File /usr/local/Zope-2.3.0/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
(Object: Traversable)
File /usr/local/Zope-2.3.0/lib/python/ZPublisher/Publish.py, line 171, in
publish
File /usr/local/Zope-2.3.0/lib/python/ZPublisher/mapply.py, line 160, in
mapply
(Object: hook)
File /usr/local/Zope-2.3.0/lib/python/ZPublisher/Publish.py, line 112, in
call_object
(Object: hook)
File /usr/local/Zope-2.3.0/lib/python/OFS/DTMLMethod.py, line 189, in
__call__
(Object: hook)
File /usr/local/Zope-2.3.0/lib/python/DocumentTemplate/DT_String.py, line
538, in __call__
(Object: hook)
File /usr/local/Zope-2.3.0/lib/python/DocumentTemplate/DT_In.py, line 711,
in renderwob
(Object: processMethod)
File /usr/local/Zope-2.3.0/lib/python/OFS/DTMLMethod.py, line 261, in
validate
(Object: hook)
File /usr/local/Zope-2.3.0/lib/python/AccessControl/SecurityManager.py,
line
144, in validate
File /usr/local/Zope-2.3.0/lib/python/AccessControl/ZopeSecurityPolicy.py,
line 164, in validate
TypeError: (see above)
---
I know I gave this to you yesterday, but I want to just re-sync with you and
just let you have a cleaner version. In the traceback above, hook is the
dtml
program (for now, I am not having it pass anything to the function and I
temporarily hard coded the information being put into the python script.)
processMethod has passthis() as the python function.
I appreciate everything you've done so far to assist me and hope that
whatever
is causing this headache is simple.
Jason
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1