Hi,

I was wondering whether it's possible to use callables for schema  
vocabularies without registering them first?
ie.

def my_vocab(context):
        while some_constraint:
                yield zope.schema.SimpleTerm()
alsoProvides(my_vocab, zope.schema.interfacesIBaseVocabulary)

class IMySchema(Interface):

        value = Choice(
                vocabulary=my_vocab
                        )

I'm sure it should be possible but my weak and feeble brain has somehow  
failed to solve the puzzle!

On a similar note: how should I handle i18n message objects that are the  
title of a SimpleTerm? At least in zope.formlib this leads to a rendering  
error because: "AttributeError: 'MessageFactory' object has no attribute  
'replace'"

Thanks for any pointers.

Charlie
-- 
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
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 )

Reply via email to