[Zope-dev] (no subject)

Kevin Dangoor kid@kendermedia.com
Wed, 8 Sep 1999 11:04:15 -0400


I recognize that code :)

That external method specifically copies all objects in a Folder (fobj) to a
destination Folder (tobj). I wrote it for a very specific purpose.

You may just want to use manage_clone. (You can look at all of the available
copy/paste functions in Zope/lib/python/OFS/CopySupport.py).

From DTML, you could probably do something like:

<dtml-call "REQUEST.set('source', docID)">
<dtml-with destinationFolder>
<dtml-call "manage_clone(source, 'newID', REQUEST)">
</dtml-with>

Replace "docID" with your document's ID, destinationFolder with your
destinationFolder and make sure that you're able to get to both of those
objects (via acquisition or whatever).

If you're still havnig trouble, it would help to know the specific context
in which you're calling that external method or manage_clone...

Kevin

-----Original Message-----
From: Anderson Ami <a_ami@hotmail.com>
To: phd@emerald.netskate.ru <phd@emerald.netskate.ru>; a_ami@hotmail.com
<a_ami@hotmail.com>
Cc: zope-dev@zope.org <zope-dev@zope.org>
Date: Wednesday, September 08, 1999 10:29 AM
Subject: Re: [Zope-dev] (no subject)


>yes, just copy and paste, but i used a follow source and it not work, just
>work with folders.
>
>def candp(fobj, tobj, REQUEST):  "Copy and paste"  ids = fobj.objectIds()
>  if not ids:    return  cdata = fobj.manage_copyObjects(ids)
>  tobj.manage_pasteObjects(cdata, REQUEST)
>
>anderson