TreeVocabulary in zope.schema.vocabulary

Jan-Carel Brand <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Organization Opkode
Message-ID <1327060202.24724.11.camel@toaster>
Hi all

I've been working on porting the Dynatree (a dynamic tree-like) widget
to z3c.form:

https://github.com/collective/collective.dynatree

My (temporary) fork is here:

https://github.com/syslabcom/collective.dynatree

And for this I needed a hierarchical tree-like vocabulary.

So I've created a TreeVocabulary in zope/schema/vocabulary.py, based
upon the existing SimpleVocabulary.

Instead of fromValues or fromItems, it has fromDict, to construct the
vocab from a dict. And the internal representation, self._terms, is a
dictionary.

My branch is here:
http://svn.zope.org/zope.schema/branches/jcbrand-treevocabulary/

The only changes are the new TreeVocabulary in zope/schema/vocabulary.py
and the tests for it in zope/schema/tests/test_vocabulary.py

Can someone please take a look and give some feedback? 

Thanks
J-C








_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.