[Zope] Visibility and Copy&Paste support
Willi Langenberger
wlang at wu-wien.ac.at
Wed Aug 31 09:24:20 EDT 2005
According to Peter Bengtsson:
> Some of these objects I don't want to encourage people to create via
> the ZMI and I don't want to clutter up the "Add new object drop down"
> with stuff that can't be added.
>
> If I register the class, but set 'visibility=None' I still can't
> copy/cut & paste the instanciated objects. Why? What's the point of
> the 'visibility=None' parameter?
As this has bitten me the last time...
The method
CopySupport.py: CopyContainer._verifyObjectPaste
is responsible for that. It refuses to paste objects with meta_types,
which are not found in the "all_meta_types" attribute of the target
object.
And yes, I find it (at least) irritating, that an object cannot be
pasted, only because it isn't in the product add list
(visibility=None). And the error message (when pasting) does not help
either:
The object ... does not support this operation.
Is there a way to hide products from the product add list without
losing the ability to paste its corresponding objects?
\wlang{}
--
Willi.Langenberger at wu-wien.ac.at Fax: +43/1/31336/9207
Zentrum fuer Informatikdienste, Wirtschaftsuniversitaet Wien, Austria
More information about the Zope
mailing list