[Zope3-Users] Sources, vocabularies, context source binders and vocabulary factories
Martin Aspeli
optilude+lists at gmail.com
Mon Mar 23 00:09:06 EDT 2009
Hi,
In zope.schema, IBaseVocabulary extends ISource, so a vocabulary is a
specialisation of a source. However, we have both an
IContextSourceBinder and an IVocabularyFactory, both of which have a
single method __call__(context) to return a source or vocabulary
respectively. However, IVocabularyFactory does not extend
IContextSourceBinder.
Is there some logic to this? Are they meant to be separate? I've seen
naemd vocabularies registered with IVocabularyFactory. Is there some
reason why you couldn't have named vocabulary factories creating simple
sources instead of vocabularies?
Martin
--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book
More information about the Zope3-users
mailing list