Re: [Zope-dev] manage_pasteObjects and REQUEST

2001-09-19 Thread Dieter Maurer

Danny William Adair writes:
 > Does anyone know when manage_PasteObjects will stop requiring REQUEST to be passed? 
 >I want to mimick the Cut/Copy/Paste Support of the management interface in a UI of my 
 >own.
 > 
 > my method "objectsCut" holds:
 > 
 > 
 > while my "objectsPaste" method holds:
 > 
 > 
 > Pasting objects will sometimes (!?!) redirect me to the management interface, which 
 >I want to hide.
In these cases, you do not ignore the return value of
"manage_pasteObjects" (which you should do).


Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] manage_pasteObjects and REQUEST

2001-09-18 Thread Danny William Adair

Hi!

Does anyone know when manage_PasteObjects will stop requiring REQUEST to be passed? I 
want to mimick the Cut/Copy/Paste Support of the management interface in a UI of my 
own.

my method "objectsCut" holds:


while my "objectsPaste" method holds:


Pasting objects will sometimes (!?!) redirect me to the management interface, which I 
want to hide.
I found these last lines in manage_pasteObjects (CopySupport.py):

def manage_pasteObjects(self, cb_copy_data=None, REQUEST=None):
"""Paste previously copied objects into the current object.
   If calling manage_pasteObjects from python code, pass
   the result of a previous call to manage_cutObjects or
   manage_copyObjects as the first argument."""
...
...
...
if REQUEST is not None:
REQUEST['RESPONSE'].setCookie('__cp', 'deleted',
path='%s' % cookie_path(REQUEST),
expires='Wed, 31-Dec-97 23:59:59 GMT')
REQUEST['__cp'] = None
return self.manage_main(self, REQUEST, update_menu=1,
cb_dataValid=0)

I don't want to hack this file.
The only way to get the cookie set seems to be passing the REQUEST object.

"...pass the result of a previous call to manage_cutObjects or manage_copyObjects as 
the first argument"

This doesn't help me very much. It would help me if I wanted to Copy/Paste or 
Cut/Paste at the same time:




works fine, but if I want to do Copy and Paste at completely different times, I have 
to pass my_clipboard_data along the requests all the time.

Is there a simple solution? Is it something I should put in the Bug Collector? Or did 
I miss something?

Thank you very much for your help,

Danny

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )