[Zope3-Users] Vocabularly

David Johnson djohnson at jsatech.com
Sun Jan 28 12:51:07 EST 2007

Does anyone know where I can find the latest methods on using  
vocabularies?  I've using one approach for a while now using  
SimpleVocabulary but that stopped working when I upgraded to 3.3.   
The errors are "SimpleVocabulary is not called".

def getFunctions():
     values = [ 'Black', 'Red', 'Blue' ]
     return SimpleVocabulary.fromValues(values)

I thought this would be a good chance to build my vocabulary skills.   
I followed Stephan's book but I am receiving errors such as:

   File "/Users/djohnson/sandbox/Zope-3.3.0/build/lib.macosx-10.3- 
fat-2.4/zope/app/form/utility.py", line 64, in _createWidget
     field = field.bind(context)
   File "/Users/djohnson/sandbox/Zope-3.3.0/build/lib.macosx-10.3- 
fat-2.4/zope/schema/_field.py", line 239, in bind
     assert ISource.providedBy(clone.vocabulary)

I figured that might be outdated, so I tried copying the "Connection  
Names" vocabularly but again I get the same errors.

What am I missing? Where should I look?

Warm regards,


More information about the Zope3-users mailing list