[Zope3-dev] Recursive containment constraints
Dominik Huber
dominik.huber at projekt01.ch
Wed Sep 15 09:01:39 EDT 2004
Month ago I read the contenttype part of stephan's book. at that time he
used
setTaggedValue to solve recursive containment constraints:
43 IMessage['__setitem__'].setTaggedValue('precondition',
44
ItemTypePrecondition(IMessage))
45 IMessage.setTaggedValue('__parent__', Field(
46 constraint=ContainerTypesConstraint(IMessageBoard,
IMessage)))
Today I wanted to use the setTaggedValue('__parent__', Field(...))
approach but it
seems not work anymore. Is that right?
>>> '__parent__' in IMessage.names('all')
False
The new version of the book solves this problem with two indepentent
interfaces IMessage
and IMessageContained. Is that the 'official' pattern people should
follow?
Thanks for the responses!
Regards,
Dominik Huber
More information about the Zope3-dev
mailing list