Re: [Zope-dev] Creating and pasting to a ZClass within a single transaction does not work
Replying to myself... Oddly enough, I'm actually getting two copies of the images (imagename and copy_of_imagename). If there are two images, then I will end up with 4 image objects in the destination object. Here's the python method that I'm using: 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) Any idea why I would get *two* copies of everything from this? Thanks, Kevin -----Original Message----- From: Kevin Dangoor <kid@kendermedia.com> To: zope-dev@zope.org <zope-dev@zope.org> Cc: brian@digicool.com <brian@digicool.com> Date: Wednesday, August 25, 1999 3:50 PM Subject: [Zope-dev] Creating and pasting to a ZClass within a single transaction does not work
Hi,
Last week, there was an exchange going on because I was having trouble copying and pasting in DTML (or Python) from a Folder to a ZClass instance. The thread started with http://www.zope.org/pipermail/zope-dev/1999-August/001248.html
It looks like the problem is that I was creating the ZClass instance and doing the copy/paste operation all at once. If I use one DTML method to create the new objects, and then a second method to do the copy/paste, everything works just fine.
Should there be a problem pasting objects to a new object within the same transaction?
Kevin
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://www.zope.org/mailman/listinfo/zope-dev
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For non-developer, user-level issues, zope@zope.org, http://www.zope.org/mailman/listinfo/zope )
participants (1)
-
Kevin Dangoor