Hi Charlie On Wed, 2012-01-25 at 10:37 +0100, Charlie Clark wrote:
Hiya,
Am 24.01.2012, 18:48 Uhr, schrieb Jan-Carel Brand <lists@opkode.com>:
I've clarified some of the docstrings and added the missing one. None have doctests, perhaps you are referring to fromDict, which gives an example dict to show the required structure. I guess that could easily be turned into a doctest, I'll look into it.
No need to add doctests. It was more a comment on the docstring of one method in comparison with the others.
It would be nice to expand the README here. I don't see anything about vocabs there at all, but I'm willing to add some tests.
er, just because the existing documentation is pants doesn't mean it can't be improved upon! ;-)
I'm still not sure about having TreeVocabulary in zope.schema if it is only going to be used with, shudder, Archetypes.
It's *not* for use with Archetypes. :) That's what for example Products.ATVocabularyManager is for. I just mentioned that this is a fairly common use-case in Plone, but up to now only with Archetypes, because a zope3-component type TreeVocabulary didn't exist yet. That's why I wrote this one.
On the one hand schema are theoretically dissociated from any form library and zope.form is already incomplete, on the other we try and avoid application-specific requirements in the libraries.
Sure. Like SimpleVocabulary, the Treevocabulary is not dependent on any form library. In my case, I use it with z3c.form, but it could also be used with for example zope.formlib or any other form library that couples with zope.schema.
All the more important to expand the documentation so that other libraries can benefit from the plumbing.
I'll see what I can do. JC