[Zope-dev] manage_clone? (amongst others!)
Chris Withers
chrisw@nipltd.com
Tue, 11 Jul 2000 13:11:04 +0100
I was going to title this 'I should give up using Zope' but I thought
I'd give it one last go...
Yesterday's 6hrs failing to do a tree-walk-and-copy in DTML failed, so I
thought I'd try in an external method today...
..well, that proved to be just as stupid.
Okay, firstup, has anything happened on this issue:
http://zope.nipltd.com/public/lists/dev-archive.nsf/ByKey/37C533B80F56E22A
Basically, it seems like doing anything with ZClasses in python (an
external method in my case) is likely to lead to suicide on your part.
How shoudl I be instantiating one?
Secondly, AFAIU, the following should copy o and put it in the folder
object 'where' with an id of 'new_id':
where.manage_clone(o,'new_id')
It does, for DTML Methods, but for anything else I get:
Error Type: AttributeError
Error Value: 'None' object has no attribute 'importFile'
(the traceback is in a PS ;-)
Why? How should I be doing this?!
Lastly, in the following:
where.manage_addProduct['OFSP'].manage_addFolder(id,title)
What does the manage_addProduct['OFSP'] actually do?
In what way does the above differ from:
where.manage_addFolder(id,title)
...which works just fine for me...
Hope _someone_ can help,
Chris
PS:
Traceback (innermost last):
File /usr/local/zope/2-1-6/lib/python/ZPublisher/Publish.py, line 214,
in publish_module
File /usr/local/zope/2-1-6/lib/python/ZPublisher/Publish.py, line 179,
in publish
File /usr/local/zope/2-1-6/lib/python/Zope/__init__.py, line 202, in
zpublisher_exception_hook
(Object: ElementWithAttributes)
File /usr/local/zope/2-1-6/lib/python/ZPublisher/Publish.py, line 165,
in publish
File /usr/local/zope/2-1-6/lib/python/ZPublisher/mapply.py, line 160,
in mapply
(Object: start)
File /usr/local/zope/2-1-6/lib/python/ZPublisher/Publish.py, line 102,
in call_object
(Object: start)
File /usr/local/zope/2-1-6/lib/python/OFS/DTMLMethod.py, line 150, in
__call__
(Object: start)
File /usr/local/zope/2-1-6/lib/python/DocumentTemplate/DT_String.py,
line 502, in __call__
(Object: start)
File /usr/local/zope/2-1-6/lib/python/DocumentTemplate/DT_With.py,
line 148, in render
(Object: o-e-s)
File /usr/local/zope/2-1-6/lib/python/DocumentTemplate/DT_Util.py,
line 335, in eval
(Object: iterate(this(),where=REQUEST['where']))
(Info: this)
File <string>, line 0, in ?
File
/usr/local/zope/2-1-6/lib/python/Products/ExternalMethod/ExternalMethod.py,
line 248, in __call__
(Object: iterate)
(Info: ((<Folder instance at 86b5fb8>,), {'where': <Folder instance
at 869c2c0>}, None))
File /usr/local/zope/dev/2-1-6/Extensions/chris.py, line 36, in
iterate
(Object: ElementWithAttributes)
File /usr/local/zope/dev/2-1-6/Extensions/chris.py, line 42, in
iterate
(Object: ElementWithAttributes)
File /usr/local/zope/2-1-6/lib/python/OFS/CopySupport.py, line 290, in
manage_clone
(Object: ElementWithAttributes)
File /usr/local/zope/2-1-6/lib/python/OFS/CopySupport.py, line 402, in
_getCopy
(Object: index_html)
AttributeError: (see above)