[Zope] hide nested classes in a python products -- how?
Tobias Herp
THerp@apriori.de
Tue, 12 Nov 2002 10:32:48 +0100
Hi, Tino,
thanks for answering.
>>
If you only use:
from ZClasses import createZClassForBase
createZClassForBase( base_class=YourProduct.HiddenBaseClass, pack=globals()
, nice_name='YourHiddenBaseClass',
meta_type='YourHiddenClass' )
you can derive from your class in ZClasses, but they dont show up in
the add list.
<<
If I get you right, I'd get again ZClasses. But I don't want ZClasses,
since it doesn't seem to be possible to get the structure again I had in
Zope 2.5.1 (consider a ZClass B _contained_in_, _not_ derived from ZClass
A. It's impossible in Zope 2.6 to define that the only objects allowed in
ZClass A objects are Bs, because B doesn't show up in the appropriate
list).
Is there a way to hide python classes, so that they can be added in their
particular containing objects only?
E.g.:
Portal
(contains) Layout
(contains) Site
(contains) Page
I know I could throw an exception when the parent object is not of the
right type, but that seems to me only the second best solution.
--
(sorry for any unfriendly footer added automatically against my wishes...
please ignore it!)