[Zope3-dev] Re: Constraining where objects can be added

Stephan Richter stephan.richter at tufts.edu
Sun Jun 6 21:42:17 EDT 2004


On Sunday 06 June 2004 06:00, Philipp von Weitershausen wrote:
> Michał Węgrzynek wrote:
> > IArtist.__parent__ = zs.Field(constraint = \
> >     zcc.ContainerTypesConstraint(IArtistsContainer))
>
> This will not work. Interfaces are not classes and they don't expose
> their fields and method definitions through the getattr protocol, but
> the getitem protocol. Alas, they don't support the setitem protocol, so
> there's no good way to dynamically change an interface like.


See the first chapter of the Content Component part in the Zope 3 book.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training



More information about the Zope3-dev mailing list