[Zope] copy / paste - paste checking for valid objects

philrobinson phil@unitec.demon.co.uk
Tue, 28 Jan 2003 16:00:11 -0000


I allow people to copy various kinds of objects to
the clipboard (using manage_copyObjects()) using
a cookie.

If 'cb_dataValid', then I present a button to let
them 'manage_pasteObjects()' back again.

But I want to restrict what objects they can
paste back out depending on where they are
trying to paste it.

For example, they might have copied an object 
of type 'a', which can meaningfully be pasted 
back into location 'b' but not location 'c'.

So I want my paste button to appear when
context is 'b', but not when it is 'c'. It seems to me
that I need a way to check the clipboard contents
in addition to just cb_dataValid.

Any ideas?
Thanks in advance... 
Cheers.
--------------------------------------
Phil Robinson.
philrobinson@ponytrot.net
--------------------------------------