[Zope3-Users] question about a constraint conflict

Christophe Combelles ccomb at free.fr
Fri Jan 5 19:35:35 EST 2007


Hello

I define the following interfaces:

class IFoo(Interface):
   pass
class IBar(Interface):
   pass

class IFooContainer(IContainer):
   contains(IFoo)
class IBarContainer(IContainer):
   contains(IBar)

Then I would like to configure a class Test to to be both a FooContainer and a 
BarContainer:

<zope:class class=".test.Test">
     <implements interface=".interfaces.IFooContainer" />
     <implements interface=".interfaces.IBarContainer" />
</zope:class>

Then I define AddMenuEntries for Foo and Bar implementations.

This does not work and as a result I only get Foo in the Add Menu. If I switch 
the two implements zcml directives, I obviously get only Bar.

Is there a solution to configure a class to be both a FooContainer and a 
BarContainer with constraintment ? (I would like to avoid dependencies between 
Foo, Bar and Test.)


thanks in advance,
Christophe


More information about the Zope3-users mailing list