|
Hi David,
I reviewed OFS.CopySupport.py which is how I knew that eInvalid exception
is being raised. I also called manage_cutObjects with the REQUEST as you
mention. That's what is weird about this whole thing. I know that I had
clipboard data and the __cp cookie is set. Everytime I tried to do the paste,
I'd get the "cookie truncated" message. You're right about the documentation. As
with most Zope documentation, it's not that great. Lately, I go straight to the
source. I find I learn more that way.
Thanks,
Tom From: David [mailto:[EMAIL PROTECTED] Sent: Thursday, March 09, 2006 12:44 AM To: Palermo, Tom Cc: '[email protected]' Subject: Re: [Zope] manage_pasteObjects question Hi Tom, I'm glad you found 'another way' but in the interest of no one I wish to add the following. These methods: manage_copyObjects, manage_cutObjects and manage_pasteObjects should be reviewed in /OFS/CopySupport.py - because the current docs do not describe them well. For example, the copy method works differently depending on whether you just pass the container's Ids or pass the Ids *and* the REQUEST. No reason to beat a dead horse but of the 3 tries you listed only the first can (but conditionally) work: context.manage_pasteObjects(context.REQUEST) But *only* if you first called manage_copyObjects (or manage_cutObject) with the REQUEST as a parameter included .... (only then does REQUEST get the __cp object) Your second try: context.manage_pasteObjects(context.cb_dataItems()) Is wrong because it is passing a list of items in the clip board instead of the the encoded copy object (returned by manage_copyObjects) that "manage_pasteObjects" expects Your last try is wrong because both parameters are incorrect. :-) All best, David |
_______________________________________________ Zope maillist - [email protected] http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
