[Zope-dev] Something doesn't seem quite right with CopySuppor t.py/Moniker.py

Brian Lloyd Brian@digicool.com
Tue, 17 Aug 1999 20:58:05 -0400


> Here is my function:
> def candp(fobj, tobj):
>   "Copy and paste"
> 
>   ids = fobj.objectIds()
>   if not ids:
>     return
>   cdata = fobj.manage_copyObjects(ids)
>   tobj.manage_pasteObjects(cdata)
> ...
> 
> Is there something that I'm missing here? I didn't see any 
> big difference
> between the management interface calling these routines and my python
> calling them...
> 
> Thanks,
> Kevin

Kevin,

I _think_ the problem is that the copy/paste machinery
really needs to be called with a REQUEST so that it can
verify whether the copy is allowed. Try this and let me
know if you still have problems:

 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)


Brian Lloyd        brian@digicool.com
Software Engineer  540.371.6909              
Digital Creations  http://www.digicool.com