[Zope3-dev] IAdding

Shane Hathaway shane at hathawaymix.org
Thu Nov 11 19:28:01 EST 2004


Today I created a content object that implemented IReadContainer but not
IContentContainer.  @@contents.html failed for this object because the
standard IAdding implementation is registered only for IContentContainer
(contents.pt broke when trying to traverse through "/@@+".)  So I looked
into creating a do-nothing IAdding implementation that would satisfy the
demands of contents.pt, but then I discovered that contents.pt relies on
methods not documented in any interface, such as "namesAccepted" and
"addingInfo".  I finally figured out that if I implement IContentContainer
as well, contents.pt works.

So I have a few questions:

- Should those undocumented methods be declared in the IAdding interface? 
I'm happy to add them if that's the right thing to do.

- Is it really necessary to implement IContentContainer?  This container
has fixed contents; it's actually only a container so that I can reuse
"@@contents.html".  No one will ever add or remove anything.

- Should there be a default do-nothing IAdding implementation?  Or, in
other words, should page templates always expect "@@+" to be traversable?

Shane




More information about the Zope3-dev mailing list