<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE></TITLE>

<META content="MSHTML 6.00.2800.1528" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><FONT color=#0000ff size=2><SPAN 
class=374435100-09032006>Hi David,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2><SPAN 
class=374435100-09032006></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2><SPAN 
class=374435100-09032006>In my last post, I wrote that I tried calling 
manage_pasteObjects a variety of ways:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT size=2><SPAN 
class=374435100-09032006>context.manage_pasteObjects(context.REQUEST)</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT><SPAN class=374435100-09032006><FONT 
size=2>context.manage_pasteObjects(context.cb_dataItems())</FONT> 
</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=374435100-09032006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=2><SPAN class=374435100-09032006>as well as the 
original:</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN 
class=374435100-09032006>context.manage_pasteObjects(cb_copy_data=context.cb_dataItems(),REQUEST=req['__cp'])</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=374435100-09032006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=2><SPAN class=374435100-09032006><FONT color=#0000ff>All 3 of 
these attemps results in the eInvalid exception gettting raised by 
manage_pasteObjects( ). req['__cp'] is a reference to the cookie that gets set 
when you place something on the clipboard. I was trying to grab a specific piece 
of the REQUEST instead of the whole thing. Does 
context.manage_pasteObjects(context.REQUEST) need to be written as: 
context.manage_pasteObjects(REQUEST=context.REQUEST)?</FONT></SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=374435100-09032006><FONT 
color=#0000ff></FONT></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=2><SPAN class=374435100-09032006><FONT color=#0000ff>It's kind 
of a moot point now anyway. I'm using some SESSION variables now to store the 
ids of te objects I want to cut and the path of their container so I can do the 
cut and paste from a single script. Not sure if this is good or not but it's 
working for me now. It's one of those times when I just need something to 
work.</FONT></SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=374435100-09032006><FONT 
color=#0000ff></FONT></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=2><SPAN class=374435100-09032006><FONT 
color=#0000ff>-Tom</FONT>&nbsp;</DIV>
<DIV><BR></DIV></SPAN></FONT>
<DIV dir=ltr align=left><BR></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> David [mailto:bluepaul@earthlink.net] 
<BR><B>Sent:</B> Wednesday, March 08, 2006 6:12 PM<BR><B>To:</B> Palermo, 
Tom<BR><B>Cc:</B> 'Dieter Maurer'; 'zope@zope.org'<BR><B>Subject:</B> Re: [Zope] 
manage_pasteObjects question<BR></FONT><BR></DIV>
<DIV></DIV>Palermo, Tom wrote: 
<BLOCKQUOTE 
cite=mid4E2885D0FE18D64E9DA136C82BB7A773021091AF@bth-exchange.constellagroup.com 
type="cite"><PRE wrap="">I'm trying to do the cut in one script and the paste in another script. It's
my understanding that REQUEST is an optional parameter to
manage_cutObjects(). Passing REQUEST will set a cookie, __cp. __cp is the
clipboard data. Later when I try to do manage_pasteObjects() from another
script, I always get a "cookie data is truncated" message regardless of how
I try to pass in the clipboard data. I should be able to just do:
context.manage_pasteObjects(context.cb_dataItems()) 

That doesn't work. I still get the "cookie data is truncated" message. I get
the same message if I do:
context.manage_pasteObjects(context.REQUEST) 

I know that there are, in fact, objects on the clipboard because I can just
do:
print context.cb_dataItems()
return printed

I'm not sure what I'm doing wrong. It seems like you can have cut and paste
happen in separate scripts. Is that not true?

Thanks,
Tom

-----Original Message-----
From: Dieter Maurer [<A class=moz-txt-link-freetext href="mailto:dieter@handshake.de">mailto:dieter@handshake.de</A>] 
Sent: Wednesday, March 08, 2006 2:07 PM
To: Palermo, Tom
Cc: '<A class=moz-txt-link-abbreviated href="mailto:zope@zope.org">zope@zope.org</A>'
Subject: Re: [Zope] manage_pasteObjects question

Palermo, Tom wrote at 2006-3-7 16:13 -0500:
  </PRE>
  <BLOCKQUOTE type="cite"><PRE wrap="">I am trying to do a manage_cutObjects in one script and then a 
manage_pasteObjects.
    </PRE></BLOCKQUOTE><PRE wrap=""><!---->
Usually, this looks like:

         obj_info = XXX.manage_cutObjects(...)
         YYY.manage_pasteObjects(obj_info)

  </PRE>
  <BLOCKQUOTE type="cite"><PRE wrap="">When I execute this line from my pasteObjects python
script:
context.manage_pasteObjects(cb_copy_data=context.cb_dataItems(),REQUEST
=req[
'__cp'])
    </PRE></BLOCKQUOTE><PRE wrap=""><!---->
Do not know, why in hell you pass in a crippled request...

  You should be aware that "req['__cp']" is not a request object...

--
Dieter
__</PRE></BLOCKQUOTE>Tom,<BR><BR>You didnt respond to Dieter's remarks .... so 
its unclear where to go with this.<BR><BR>You coded:<BR>
<DIV><BIG><SPAN class=155430421-07032006><FONT size=2><BIG>&nbsp;&nbsp;&nbsp; 
context.manage_pasteObjects(cb_copy_data=context.cb_dataItems(),REQUEST=req['__cp'])<BR><BR>What 
is the last parameter doing?&nbsp; REQUEST=req['__cp'] ?&nbsp; The 
manage_pastObjects expects a REQUEST object, e.g. 
REQUEST=context.REQUEST.<BR><BR>Did you try this?&nbsp;&nbsp; 
<BR><BR>David<BR><BR><BR><BR><BR></BIG></FONT></SPAN></BIG></DIV>
<DIV><PRE><SPAN class=155430421-07032006></SPAN></PRE></DIV></BODY></HTML>